<html>
<head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <!--<script type="text/javascript" src="com.iskitz.ajile.js"></script>-->
<script>
var $wnd = parent;
var $doc = $wnd.document;
var $moduleName = "LlkApp";
var module_load_request = {};
var modules = {};
$doc.modules = modules;
var pyjs_options = new Object();
pyjs_options.set_all = function (v) {
    pyjs_options.arg_ignore = v;
    pyjs_options.arg_count = v;
    pyjs_options.arg_is_instance = v;
    pyjs_options.arg_instance_type = v;
    pyjs_options.arg_kwarg_dup = v;
    pyjs_options.arg_kwarg_unexpected_keyword = v;
    pyjs_options.arg_kwarg_multiple_values = v;
}
pyjs_options.set_all(true);
var trackstack = [];
var track = {module:'__main__', lineno: 1};
trackstack.push(track);
</script>

</head>
<body onload="if (parent && parent.__pygwt_webModeFrameOnLoad) parent.__pygwt_webModeFrameOnLoad(window, 'LlkApp');">
<font face='arial' size='-1'>This script is part of module</font> <code>LlkApp</code>



<script><!--

/* early app libs */


//
// BEGIN LIB sys
//

var sys = function (__mod_name__) {
	if(sys.__was_initialized__) return;
	sys.__was_initialized__ = true;
	if (__mod_name__ == null) __mod_name__ = 'sys';
	var __name__ = sys.__name__ = __mod_name__;
	sys.__track_lines__ = new Array();
	sys.__track_lines__[1] = "sys.py, line 1:\n    # the platform name (PyV8, smjs, Mozilla, IE6, Opera, Safari etc.)";
	sys.__track_lines__[2] = "sys.py, line 2:\n    platform = \'\' # to be updated by app, on compile";
	sys.__track_lines__[5] = "sys.py, line 5:\n    overrides = None # to be updated by app, on compile";
	sys.__track_lines__[8] = "sys.py, line 8:\n    loadpath = None";
	sys.__track_lines__[10] = "sys.py, line 10:\n    stacktrace = None";
	sys.__track_lines__[12] = "sys.py, line 12:\n    appname = None";
	sys.__track_lines__[14] = "sys.py, line 14:\n    def setloadpath(lp):";
	sys.__track_lines__[15] = "sys.py, line 15:\n    global loadpath";
	sys.__track_lines__[16] = "sys.py, line 16:\n    loadpath = lp";
	sys.__track_lines__[18] = "sys.py, line 18:\n    def setappname(an):";
	sys.__track_lines__[19] = "sys.py, line 19:\n    global appname";
	sys.__track_lines__[20] = "sys.py, line 20:\n    appname = an";
	sys.__track_lines__[22] = "sys.py, line 22:\n    def getloadpath():";
	sys.__track_lines__[23] = "sys.py, line 23:\n    global loadpath";
	sys.__track_lines__[24] = "sys.py, line 24:\n    return loadpath";
	sys.__track_lines__[26] = "sys.py, line 26:\n    def addoverride(module_name, path):";
	sys.__track_lines__[27] = "sys.py, line 27:\n    global overrides";
	sys.__track_lines__[28] = "sys.py, line 28:\n    overrides[module_name] = path";
	sys.__track_lines__[30] = "sys.py, line 30:\n    __last_exception__ = None";
	sys.__track_lines__[31] = "sys.py, line 31:\n    __last_exception_stack__ = None";
	sys.__track_lines__[32] = "sys.py, line 32:\n    def exc_info():";
	sys.__track_lines__[33] = "sys.py, line 33:\n    global __last_exception__";
	sys.__track_lines__[34] = "sys.py, line 34:\n    if not __last_exception__:";
	sys.__track_lines__[35] = "sys.py, line 35:\n    return (None, None, None)";
	sys.__track_lines__[36] = "sys.py, line 36:\n    return (__last_exception__.error.__class__, __last_exception__.error, None)";
	sys.__track_lines__[38] = "sys.py, line 38:\n    def exc_clear():";
	sys.__track_lines__[39] = "sys.py, line 39:\n    global __last_exception__";
	sys.__track_lines__[40] = "sys.py, line 40:\n    __last_exception__ = None";
	sys.__track_lines__[54] = "sys.py, line 43:\n    JS(\"\"\"sys.save_exception_stack = function () { ... }\"\"\")";
	sys.__track_lines__[56] = "sys.py, line 56:\n    def trackstackstr(stack=None):";
	sys.__track_lines__[57] = "sys.py, line 57:\n    global __last_exception_stack__";
	sys.__track_lines__[58] = "sys.py, line 58:\n    if stack is None:";
	sys.__track_lines__[59] = "sys.py, line 59:\n    stack = __last_exception_stack__";
	sys.__track_lines__[60] = "sys.py, line 60:\n    if not stack:";
	sys.__track_lines__[61] = "sys.py, line 61:\n    return \'\'";
	sys.__track_lines__[62] = "sys.py, line 62:\n    stackstrings = []";
	sys.__track_lines__[63] = "sys.py, line 63:\n    for s in list(stack):";
	sys.__track_lines__[64] = "sys.py, line 64:\n    JS(\"var msg = eval(s.module + \'.__track_lines__[\' + s.lineno + \']\');\")";
	sys.__track_lines__[65] = "sys.py, line 65:\n    if msg:";
	sys.__track_lines__[66] = "sys.py, line 66:\n    stackstrings.append(msg)";
	sys.__track_lines__[68] = "sys.py, line 68:\n    stackstrings.append(\'%s.py, line %d\' % (s.module, s.lineno))";
	sys.__track_lines__[69] = "sys.py, line 69:\n    return \'\\n\'.join(stackstrings)";
	track.module='sys';
	track.lineno=1;
	track.lineno=2;
	sys.platform = String('');
	track.lineno=5;
	sys.overrides = null;
	track.lineno=8;
	sys.loadpath = null;
	track.lineno=10;
	sys.stacktrace = null;
	track.lineno=12;
	sys.appname = null;
	track.lineno=14;
	sys.setloadpath = function(lp) {
		if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length);
		track={module:'sys',lineno:14};trackstack.push(track);
		track.module='sys';
		track.lineno=14;
		track.lineno=15;
		track.lineno=16;
		sys.loadpath = lp;
		trackstack.pop();track=trackstack.pop();trackstack.push(track);
		return null;
	};
	sys.setloadpath.__name__ = 'setloadpath';

	sys.setloadpath.parse_kwargs = function ( __kwargs, lp ) {
		if (typeof lp == 'undefined') {
			lp=__kwargs.lp;
			delete __kwargs.lp;
		} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.lp != 'undefined') {
			pyjs__exception_func_multiple_values('sys.setloadpath', 'lp');
		}
		if (pyjs_options.arg_kwarg_unexpected_keyword) {
			for (var i in __kwargs) {
				pyjs__exception_func_unexpected_keyword('sys.setloadpath', i);
			}
		}
		var __r = [lp];
		for (var pyjs__va_arg = 2;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
			__r.push(arguments[pyjs__va_arg]);
		}

		return __r;
	};
	track.lineno=18;
	sys.setappname = function(an) {
		if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length);
		track={module:'sys',lineno:18};trackstack.push(track);
		track.module='sys';
		track.lineno=18;
		track.lineno=19;
		track.lineno=20;
		sys.appname = an;
		trackstack.pop();track=trackstack.pop();trackstack.push(track);
		return null;
	};
	sys.setappname.__name__ = 'setappname';

	sys.setappname.parse_kwargs = function ( __kwargs, an ) {
		if (typeof an == 'undefined') {
			an=__kwargs.an;
			delete __kwargs.an;
		} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.an != 'undefined') {
			pyjs__exception_func_multiple_values('sys.setappname', 'an');
		}
		if (pyjs_options.arg_kwarg_unexpected_keyword) {
			for (var i in __kwargs) {
				pyjs__exception_func_unexpected_keyword('sys.setappname', i);
			}
		}
		var __r = [an];
		for (var pyjs__va_arg = 2;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
			__r.push(arguments[pyjs__va_arg]);
		}

		return __r;
	};
	track.lineno=22;
	sys.getloadpath = function() {
		if (pyjs_options.arg_count && arguments.length != 0) pyjs__exception_func_param(arguments.callee.__name__, 0, 0, arguments.length);
		track={module:'sys',lineno:22};trackstack.push(track);
		track.module='sys';
		track.lineno=22;
		track.lineno=23;
		track.lineno=24;
		track.lineno=24;
		var pyjs__ret = sys.loadpath;
		trackstack.pop();track=trackstack.pop();trackstack.push(track);
		return pyjs__ret;
	};
	sys.getloadpath.__name__ = 'getloadpath';

	sys.getloadpath.parse_kwargs = function ( __kwargs ) {
		if (pyjs_options.arg_kwarg_unexpected_keyword) {
			for (var i in __kwargs) {
				pyjs__exception_func_unexpected_keyword('sys.getloadpath', i);
			}
		}
		var __r = [];
		for (var pyjs__va_arg = 1;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
			__r.push(arguments[pyjs__va_arg]);
		}

		return __r;
	};
	track.lineno=26;
	sys.addoverride = function(module_name, path) {
		if (pyjs_options.arg_count && arguments.length != 2) pyjs__exception_func_param(arguments.callee.__name__, 2, 2, arguments.length);
		track={module:'sys',lineno:26};trackstack.push(track);
		track.module='sys';
		track.lineno=26;
		track.lineno=27;
		track.lineno=28;
		sys.overrides.__setitem__(module_name, path);
		trackstack.pop();track=trackstack.pop();trackstack.push(track);
		return null;
	};
	sys.addoverride.__name__ = 'addoverride';

	sys.addoverride.parse_kwargs = function ( __kwargs, module_name, path ) {
		if (typeof module_name == 'undefined') {
			module_name=__kwargs.module_name;
			delete __kwargs.module_name;
		} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.module_name != 'undefined') {
			pyjs__exception_func_multiple_values('sys.addoverride', 'module_name');
		}
		if (typeof path == 'undefined') {
			path=__kwargs.path;
			delete __kwargs.path;
		} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.path != 'undefined') {
			pyjs__exception_func_multiple_values('sys.addoverride', 'path');
		}
		if (pyjs_options.arg_kwarg_unexpected_keyword) {
			for (var i in __kwargs) {
				pyjs__exception_func_unexpected_keyword('sys.addoverride', i);
			}
		}
		var __r = [module_name, path];
		for (var pyjs__va_arg = 3;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
			__r.push(arguments[pyjs__va_arg]);
		}

		return __r;
	};
	track.lineno=30;
	sys.__last_exception__ = null;
	track.lineno=31;
	sys.__last_exception_stack__ = null;
	track.lineno=32;
	sys.exc_info = function() {
		if (pyjs_options.arg_count && arguments.length != 0) pyjs__exception_func_param(arguments.callee.__name__, 0, 0, arguments.length);
		track={module:'sys',lineno:32};trackstack.push(track);
		track.module='sys';
		track.lineno=32;
		track.lineno=33;
		track.lineno=34;
		if (pyjslib.bool(!(sys.__last_exception__))) {
			track.lineno=35;
			track.lineno=35;
			var pyjs__ret = new pyjslib.Tuple([null, null, null]);
			trackstack.pop();track=trackstack.pop();trackstack.push(track);
			return pyjs__ret;
		}
		track.lineno=36;
		track.lineno=36;
		var pyjs__ret = new pyjslib.Tuple([(sys.__last_exception__.error.__class__===undefined?(function(){throw new TypeError('sys.__last_exception__.error.__class__ is undefined')})():(typeof sys.__last_exception__.error.__class__ == 'function' && sys.__last_exception__.error.__is_instance__?pyjslib.getattr(sys.__last_exception__.error, '__class__'):sys.__last_exception__.error.__class__)), (sys.__last_exception__.error===undefined?(function(){throw new TypeError('sys.__last_exception__.error is undefined')})():(typeof sys.__last_exception__.error == 'function' && sys.__last_exception__.__is_instance__?pyjslib.getattr(sys.__last_exception__, 'error'):sys.__last_exception__.error)), null]);
		trackstack.pop();track=trackstack.pop();trackstack.push(track);
		return pyjs__ret;
	};
	sys.exc_info.__name__ = 'exc_info';

	sys.exc_info.parse_kwargs = function ( __kwargs ) {
		if (pyjs_options.arg_kwarg_unexpected_keyword) {
			for (var i in __kwargs) {
				pyjs__exception_func_unexpected_keyword('sys.exc_info', i);
			}
		}
		var __r = [];
		for (var pyjs__va_arg = 1;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
			__r.push(arguments[pyjs__va_arg]);
		}

		return __r;
	};
	track.lineno=38;
	sys.exc_clear = function() {
		if (pyjs_options.arg_count && arguments.length != 0) pyjs__exception_func_param(arguments.callee.__name__, 0, 0, arguments.length);
		track={module:'sys',lineno:38};trackstack.push(track);
		track.module='sys';
		track.lineno=38;
		track.lineno=39;
		track.lineno=40;
		sys.__last_exception__ = null;
		trackstack.pop();track=trackstack.pop();trackstack.push(track);
		return null;
	};
	sys.exc_clear.__name__ = 'exc_clear';

	sys.exc_clear.parse_kwargs = function ( __kwargs ) {
		if (pyjs_options.arg_kwarg_unexpected_keyword) {
			for (var i in __kwargs) {
				pyjs__exception_func_unexpected_keyword('sys.exc_clear', i);
			}
		}
		var __r = [];
		for (var pyjs__va_arg = 1;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
			__r.push(arguments[pyjs__va_arg]);
		}

		return __r;
	};
	track.lineno=54;
sys.save_exception_stack = function () {
    var save_stack = [];
    for (var needle in trackstack) {
        var t = new Object();
        for (var p in trackstack[needle]) {
            t[p] = trackstack[needle][p];
        }
        save_stack.push(t);
        sys.__last_exception_stack__ = save_stack;
    }
return null;
}
	track.lineno=56;
	sys.trackstackstr = function(stack) {
		if (pyjs_options.arg_count && (arguments.length < 0 || arguments.length > 1)) pyjs__exception_func_param(arguments.callee.__name__, 0, 1, arguments.length);
		if (typeof stack == 'undefined') stack=null;
		track={module:'sys',lineno:56};trackstack.push(track);
		track.module='sys';
		track.lineno=56;
		track.lineno=57;
		track.lineno=58;
		if (pyjslib.bool((stack === null))) {
			track.lineno=59;
			stack = sys.__last_exception_stack__;
		}
		track.lineno=60;
		if (pyjslib.bool(!(stack))) {
			track.lineno=61;
			track.lineno=61;
			var pyjs__ret = String('');
			trackstack.pop();track=trackstack.pop();trackstack.push(track);
			return pyjs__ret;
		}
		track.lineno=62;
		var stackstrings = new pyjslib.List([]);
		track.lineno=63;
		var pyjs__trackstack_size_1=trackstack.length;
		var __s = pyjslib.list(stack).__iter__();
		try {
			while (true) {
				var s = __s.next();
				
				track.lineno=64;
var msg = eval(s.module + '.__track_lines__[' + s.lineno + ']');
				track.lineno=65;
				if (pyjslib.bool(msg)) {
					track.lineno=66;
					stackstrings.append(msg);
				}
				else {
					track.lineno=68;
					stackstrings.append(pyjslib.sprintf(String('%s.py, line %d'), new pyjslib.Tuple([(s.module===undefined?(function(){throw new TypeError('s.module is undefined')})():(typeof s.module == 'function' && s.__is_instance__?pyjslib.getattr(s, 'module'):s.module)), (s.lineno===undefined?(function(){throw new TypeError('s.lineno is undefined')})():(typeof s.lineno == 'function' && s.__is_instance__?pyjslib.getattr(s, 'lineno'):s.lineno))])));
				}
			}
		} catch (e) {
			if (e.__name__ != 'StopIteration') {
				throw e;
			}
		}
		if (trackstack.length > pyjs__trackstack_size_1) {
			trackstack = trackstack.slice(0,pyjs__trackstack_size_1);
			track = trackstack.slice(-1)[0];
		}
		track.module='sys';
		track.lineno=69;
		track.lineno=69;
		var pyjs__ret = String('\x0A').join(stackstrings);
		trackstack.pop();track=trackstack.pop();trackstack.push(track);
		return pyjs__ret;
	};
	sys.trackstackstr.__name__ = 'trackstackstr';

	sys.trackstackstr.parse_kwargs = function ( __kwargs, stack ) {
		if (typeof stack == 'undefined') {
			stack=__kwargs.stack;
			delete __kwargs.stack;
		} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.stack != 'undefined') {
			pyjs__exception_func_multiple_values('sys.trackstackstr', 'stack');
		}
		if (pyjs_options.arg_kwarg_unexpected_keyword) {
			for (var i in __kwargs) {
				pyjs__exception_func_unexpected_keyword('sys.trackstackstr', i);
			}
		}
		var __r = [stack];
		for (var pyjs__va_arg = 2;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
			__r.push(arguments[pyjs__va_arg]);
		}

		return __r;
	};

return this;
}; /* end sys */ 


/* initialize static library */
sys();


//
// END LIB sys
//


//
// BEGIN LIB pyjslib
//

var pyjslib = function (__mod_name__) {
	if(pyjslib.__was_initialized__) return;
	pyjslib.__was_initialized__ = true;
	if (__mod_name__ == null) __mod_name__ = 'pyjslib';
	var __name__ = pyjslib.__name__ = __mod_name__;
	pyjslib.__track_lines__ = new Array();
	pyjslib.__track_lines__[512] = "pyjslib.py, line 512:\n    return self.name";
	pyjslib.__track_lines__[1] = "pyjslib.py, line 1:\n    # Copyright 2006 James Tauber and contributors";
	pyjslib.__track_lines__[1538] = "pyjslib.py, line 1538:\n    maxValue = item";
	pyjslib.__track_lines__[515] = "pyjslib.py, line 514:\n    @noSourceTracking ... def eq(a,b):";
	pyjslib.__track_lines__[1540] = "pyjslib.py, line 1540:\n    maxValue = item";
	pyjslib.__track_lines__[1541] = "pyjslib.py, line 1541:\n    return maxValue";
	pyjslib.__track_lines__[1537] = "pyjslib.py, line 1537:\n    if maxValue is None:";
	pyjslib.__track_lines__[1544] = "pyjslib.py, line 1544:\n    next_hash_id = 0";
	pyjslib.__track_lines__[1547] = "pyjslib.py, line 1546:\n    @noSourceTracking ... def hash(obj):";
	pyjslib.__track_lines__[18] = "pyjslib.py, line 18:\n    from __pyjamas__ import JS";
	pyjslib.__track_lines__[23] = "pyjslib.py, line 22:\n    @noSourceTracking ... def import_module(path, parent_module, module_name, dynamic=1, async=False):";
	pyjslib.__track_lines__[536] = "pyjslib.py, line 535:\n    @noSourceTracking ... def cmp(a,b):";
	pyjslib.__track_lines__[1562] = "pyjslib.py, line 1562:\n    def hash(obj):";
	pyjslib.__track_lines__[1572] = "pyjslib.py, line 1563:\n    JS(\"\"\" ... \"\"\")";
	pyjslib.__track_lines__[1576] = "pyjslib.py, line 1575:\n    @noSourceTracking ... def isObject(a):";
	pyjslib.__track_lines__[556] = "pyjslib.py, line 555:\n    @noSourceTracking ... def bool(v):";
	pyjslib.__track_lines__[1582] = "pyjslib.py, line 1581:\n    @noSourceTracking ... def isFunction(a):";
	pyjslib.__track_lines__[1586] = "pyjslib.py, line 1586:\n    callable = isFunction";
	pyjslib.__track_lines__[1589] = "pyjslib.py, line 1588:\n    @noSourceTracking ... def isString(a):";
	pyjslib.__track_lines__[1536] = "pyjslib.py, line 1536:\n    for item in sequence:";
	pyjslib.__track_lines__[1595] = "pyjslib.py, line 1594:\n    @noSourceTracking ... def isNull(a):";
	pyjslib.__track_lines__[576] = "pyjslib.py, line 2:\n    # ... class List:";
	pyjslib.__track_lines__[1601] = "pyjslib.py, line 1600:\n    @noSourceTracking ... def isArray(a):";
	pyjslib.__track_lines__[1607] = "pyjslib.py, line 1606:\n    @noSourceTracking ... def isUndefined(a):";
	pyjslib.__track_lines__[1613] = "pyjslib.py, line 1612:\n    @noSourceTracking ... def isIteratable(a):";
	pyjslib.__track_lines__[1619] = "pyjslib.py, line 1618:\n    @noSourceTracking ... def isNumber(a):";
	pyjslib.__track_lines__[1625] = "pyjslib.py, line 1624:\n    @noSourceTracking ... def toJSObjects(x):";
	pyjslib.__track_lines__[1295] = "pyjslib.py, line 1294:\n    @noSourceTracking ... def repr(x):";
	pyjslib.__track_lines__[1133] = "pyjslib.py, line 1133:\n    def __repr__(self):";
	pyjslib.__track_lines__[110] = "pyjslib.py, line 109:\n    @noSourceTracking ... def import_wait(proceed_fn, parent_mod, dynamic):";
	pyjslib.__track_lines__[1535] = "pyjslib.py, line 1535:\n    maxValue = None";
	pyjslib.__track_lines__[1152] = "pyjslib.py, line 1138:\n    JS(\"\"\" ... \"\"\")";
	pyjslib.__track_lines__[1154] = "pyjslib.py, line 1154:\n    dict = Dict";
	pyjslib.__track_lines__[1899] = "pyjslib.py, line 1899:\n    return float(p)";
	pyjslib.__track_lines__[1669] = "pyjslib.py, line 1668:\n    @noSourceTracking ... def sprintf(strng, args):";
	pyjslib.__track_lines__[1158] = "pyjslib.py, line 1157:\n    @noSourceTracking ... def _super(type_, object_or_type = None):";
	pyjslib.__track_lines__[1192] = "pyjslib.py, line 1191:\n    @noSourceTracking ... def range(start, stop = None, step = 1):";
	pyjslib.__track_lines__[188] = "pyjslib.py, line 188:\n    class object:";
	pyjslib.__track_lines__[191] = "pyjslib.py, line 191:\n    Object = object";
	pyjslib.__track_lines__[193] = "pyjslib.py, line 193:\n    class Modload:";
	pyjslib.__track_lines__[1227] = "pyjslib.py, line 1226:\n    @noSourceTracking ... def slice(object, lower, upper):";
	pyjslib.__track_lines__[711] = "pyjslib.py, line 711:\n    def sort(self, compareFunc=None, keyFunc=None, reverse=False):";
	pyjslib.__track_lines__[712] = "pyjslib.py, line 712:\n    if not compareFunc:";
	pyjslib.__track_lines__[713] = "pyjslib.py, line 713:\n    global cmp";
	pyjslib.__track_lines__[714] = "pyjslib.py, line 714:\n    compareFunc = cmp";
	pyjslib.__track_lines__[715] = "pyjslib.py, line 715:\n    if keyFunc and reverse:";
	pyjslib.__track_lines__[716] = "pyjslib.py, line 716:\n    def thisSort1(a,b):";
	pyjslib.__track_lines__[717] = "pyjslib.py, line 717:\n    return -compareFunc(keyFunc(a), keyFunc(b))";
	pyjslib.__track_lines__[718] = "pyjslib.py, line 718:\n    self.l.sort(thisSort1)";
	pyjslib.__track_lines__[720] = "pyjslib.py, line 720:\n    def thisSort2(a,b):";
	pyjslib.__track_lines__[721] = "pyjslib.py, line 721:\n    return compareFunc(keyFunc(a), keyFunc(b))";
	pyjslib.__track_lines__[722] = "pyjslib.py, line 722:\n    self.l.sort(thisSort2)";
	pyjslib.__track_lines__[724] = "pyjslib.py, line 724:\n    def thisSort3(a,b):";
	pyjslib.__track_lines__[725] = "pyjslib.py, line 725:\n    return -compareFunc(a, b)";
	pyjslib.__track_lines__[726] = "pyjslib.py, line 726:\n    self.l.sort(thisSort3)";
	pyjslib.__track_lines__[728] = "pyjslib.py, line 728:\n    self.l.sort(compareFunc)";
	pyjslib.__track_lines__[218] = "pyjslib.py, line 218:\n    def get_module(module_name):";
	pyjslib.__track_lines__[219] = "pyjslib.py, line 219:\n    ev = \"__mod = %s;\" % module_name";
	pyjslib.__track_lines__[220] = "pyjslib.py, line 220:\n    JS(\"pyjs_eval(ev);\")";
	pyjslib.__track_lines__[221] = "pyjslib.py, line 221:\n    return __mod";
	pyjslib.__track_lines__[1246] = "pyjslib.py, line 1245:\n    @noSourceTracking ... def str(text):";
	pyjslib.__track_lines__[223] = "pyjslib.py, line 223:\n    def preload_app_modules(path, app_modnames, app_imported_fn, dynamic,";
	pyjslib.__track_lines__[226] = "pyjslib.py, line 226:\n    loader = Modload(path, app_modnames, app_imported_fn, dynamic, parent_mod)";
	pyjslib.__track_lines__[227] = "pyjslib.py, line 227:\n    loader.next()";
	pyjslib.__track_lines__[229] = "pyjslib.py, line 229:\n    import sys";
	pyjslib.__track_lines__[231] = "pyjslib.py, line 231:\n    class BaseException:";
	pyjslib.__track_lines__[745] = "pyjslib.py, line 745:\n    def __repr__(self):";
	pyjslib.__track_lines__[235] = "pyjslib.py, line 235:\n    def __init__(self, *args):";
	pyjslib.__track_lines__[236] = "pyjslib.py, line 236:\n    self.args = args";
	pyjslib.__track_lines__[237] = "pyjslib.py, line 237:\n    if len(args) == 1:";
	pyjslib.__track_lines__[238] = "pyjslib.py, line 238:\n    self.message = args[0]";
	pyjslib.__track_lines__[240] = "pyjslib.py, line 240:\n    def __str__(self):";
	pyjslib.__track_lines__[241] = "pyjslib.py, line 241:\n    if len(self.args) is 0:";
	pyjslib.__track_lines__[242] = "pyjslib.py, line 242:\n    return \'\'";
	pyjslib.__track_lines__[1267] = "pyjslib.py, line 1266:\n    @noSourceTracking ... def chr(x):";
	pyjslib.__track_lines__[244] = "pyjslib.py, line 244:\n    return str(self.message)";
	pyjslib.__track_lines__[245] = "pyjslib.py, line 245:\n    return repr(self.args)";
	pyjslib.__track_lines__[759] = "pyjslib.py, line 750:\n    JS(\"\"\" ... \"\"\")";
	pyjslib.__track_lines__[248] = "pyjslib.py, line 248:\n    return self.__name__ + repr(self.args)";
	pyjslib.__track_lines__[761] = "pyjslib.py, line 761:\n    list = List";
	pyjslib.__track_lines__[250] = "pyjslib.py, line 250:\n    def toString(self):";
	pyjslib.__track_lines__[763] = "pyjslib.py, line 763:\n    class Tuple:";
	pyjslib.__track_lines__[253] = "pyjslib.py, line 253:\n    class Exception(BaseException):";
	pyjslib.__track_lines__[256] = "pyjslib.py, line 256:\n    class StandardError(Exception):";
	pyjslib.__track_lines__[259] = "pyjslib.py, line 259:\n    class TypeError(StandardError):";
	pyjslib.__track_lines__[1285] = "pyjslib.py, line 1284:\n    @noSourceTracking ... def get_pyjs_classtype(x):";
	pyjslib.__track_lines__[262] = "pyjslib.py, line 262:\n    class LookupError(StandardError):";
	pyjslib.__track_lines__[264] = "pyjslib.py, line 264:\n    def toString(self):";
	pyjslib.__track_lines__[265] = "pyjslib.py, line 265:\n    return self.__name__ + \": \" + self.args[0]";
	pyjslib.__track_lines__[267] = "pyjslib.py, line 267:\n    class KeyError(LookupError):";
	pyjslib.__track_lines__[269] = "pyjslib.py, line 269:\n    def __str__(self):";
	pyjslib.__track_lines__[270] = "pyjslib.py, line 270:\n    if len(self.args) is 0:";
	pyjslib.__track_lines__[271] = "pyjslib.py, line 271:\n    return \'\'";
	pyjslib.__track_lines__[273] = "pyjslib.py, line 273:\n    return repr(self.message)";
	pyjslib.__track_lines__[274] = "pyjslib.py, line 274:\n    return repr(self.args)";
	pyjslib.__track_lines__[276] = "pyjslib.py, line 276:\n    class AttributeError(StandardError):";
	pyjslib.__track_lines__[278] = "pyjslib.py, line 278:\n    def toString(self):";
	pyjslib.__track_lines__[279] = "pyjslib.py, line 279:\n    return \"AttributeError: %s of %s\" % (self.args[1], self.args[0])";
	pyjslib.__track_lines__[281] = "pyjslib.py, line 281:\n    class NameError(StandardError):";
	pyjslib.__track_lines__[284] = "pyjslib.py, line 284:\n    class ValueError(StandardError):";
	pyjslib.__track_lines__[287] = "pyjslib.py, line 287:\n    class IndexError(LookupError):";
	pyjslib.__track_lines__[1932] = "pyjslib.py, line 1932:\n    def any(iterable):";
	pyjslib.__track_lines__[1354] = "pyjslib.py, line 1353:\n    @noSourceTracking ... def float(text):";
	pyjslib.__track_lines__[1869] = "pyjslib.py, line 8:\n    # ... def printFunc(objs, newline):";
	pyjslib.__track_lines__[1933] = "pyjslib.py, line 1933:\n    for element in iterable:";
	pyjslib.__track_lines__[1360] = "pyjslib.py, line 1359:\n    @noSourceTracking ... def int(text, radix=0):";
	pyjslib.__track_lines__[1934] = "pyjslib.py, line 1934:\n    if element:";
	pyjslib.__track_lines__[1366] = "pyjslib.py, line 1365:\n    @noSourceTracking ... def len(object):";
	pyjslib.__track_lines__[1881] = "pyjslib.py, line 1880:\n    @noSourceTracking ... def type(clsname, bases=None, methods=None):";
	pyjslib.__track_lines__[1935] = "pyjslib.py, line 1935:\n    return True";
	pyjslib.__track_lines__[1374] = "pyjslib.py, line 1373:\n    @noSourceTracking ... def isinstance(object_, classinfo):";
	pyjslib.__track_lines__[1936] = "pyjslib.py, line 1936:\n    return False";
	pyjslib.__track_lines__[1529] = "pyjslib.py, line 1529:\n    return minValue";
	pyjslib.__track_lines__[1495] = "pyjslib.py, line 1494:\n    @noSourceTracking ... def map(obj, method, sequence=None):";
	pyjslib.__track_lines__[1896] = "pyjslib.py, line 1896:\n    def pow(x, y, z = None):";
	pyjslib.__track_lines__[1897] = "pyjslib.py, line 1897:\n    JS(\"p = Math.pow(x, y);\")";
	pyjslib.__track_lines__[1898] = "pyjslib.py, line 1898:\n    if z is None:";
	pyjslib.__track_lines__[1255] = "pyjslib.py, line 1254:\n    @noSourceTracking ... def ord(x):";
	pyjslib.__track_lines__[1900] = "pyjslib.py, line 1900:\n    return float(p % z)";
	pyjslib.__track_lines__[1389] = "pyjslib.py, line 1388:\n    @noSourceTracking ... def _isinstance(object_, classinfo):";
	pyjslib.__track_lines__[1902] = "pyjslib.py, line 1902:\n    def hex(x):";
	pyjslib.__track_lines__[1903] = "pyjslib.py, line 1903:\n    if int(x) != x:";
	pyjslib.__track_lines__[1904] = "pyjslib.py, line 1904:\n    raise TypeError(\"hex() argument can\'t be converted to hex\")";
	pyjslib.__track_lines__[1905] = "pyjslib.py, line 1905:\n    JS(\"r = \'0x\'+x.toString(16);\")";
	pyjslib.__track_lines__[1906] = "pyjslib.py, line 1906:\n    return str(r)";
	pyjslib.__track_lines__[1908] = "pyjslib.py, line 1908:\n    def oct(x):";
	pyjslib.__track_lines__[1909] = "pyjslib.py, line 1909:\n    if int(x) != x:";
	pyjslib.__track_lines__[1910] = "pyjslib.py, line 1910:\n    raise TypeError(\"oct() argument can\'t be converted to oct\")";
	pyjslib.__track_lines__[1911] = "pyjslib.py, line 1911:\n    JS(\"r = \'0\'+x.toString(8);\")";
	pyjslib.__track_lines__[1912] = "pyjslib.py, line 1912:\n    return str(r)";
	pyjslib.__track_lines__[1401] = "pyjslib.py, line 1400:\n    @noSourceTracking ... def _issubtype(object_, classinfo):";
	pyjslib.__track_lines__[1914] = "pyjslib.py, line 1914:\n    def round(x, n = 0):";
	pyjslib.__track_lines__[1915] = "pyjslib.py, line 1915:\n    n = pow(10, n)";
	pyjslib.__track_lines__[1916] = "pyjslib.py, line 1916:\n    JS(\"r = Math.round(n*x)/n;\")";
	pyjslib.__track_lines__[1917] = "pyjslib.py, line 1917:\n    return float(r)";
	pyjslib.__track_lines__[1919] = "pyjslib.py, line 1919:\n    def divmod(x, y):";
	pyjslib.__track_lines__[1920] = "pyjslib.py, line 1920:\n    if int(x) == x and int(y) == y:";
	pyjslib.__track_lines__[1921] = "pyjslib.py, line 1921:\n    return (int(x / y), int(x % y))";
	pyjslib.__track_lines__[1922] = "pyjslib.py, line 1922:\n    JS(\"f = Math.floor(x / y);\")";
	pyjslib.__track_lines__[1923] = "pyjslib.py, line 1923:\n    f = float(f)";
	pyjslib.__track_lines__[1924] = "pyjslib.py, line 1924:\n    return (f, x - f * y)";
	pyjslib.__track_lines__[1413] = "pyjslib.py, line 1412:\n    @noSourceTracking ... def getattr(obj, name, default=None):";
	pyjslib.__track_lines__[1926] = "pyjslib.py, line 1926:\n    def all(iterable):";
	pyjslib.__track_lines__[1927] = "pyjslib.py, line 1927:\n    for element in iterable:";
	pyjslib.__track_lines__[1928] = "pyjslib.py, line 1928:\n    if not element:";
	pyjslib.__track_lines__[1929] = "pyjslib.py, line 1929:\n    return False";
	pyjslib.__track_lines__[1930] = "pyjslib.py, line 1930:\n    return True";
	pyjslib.__track_lines__[908] = "pyjslib.py, line 908:\n    def sort(self, compareFunc=None, keyFunc=None, reverse=False):";
	pyjslib.__track_lines__[909] = "pyjslib.py, line 909:\n    if not compareFunc:";
	pyjslib.__track_lines__[910] = "pyjslib.py, line 910:\n    global cmp";
	pyjslib.__track_lines__[911] = "pyjslib.py, line 911:\n    compareFunc = cmp";
	pyjslib.__track_lines__[912] = "pyjslib.py, line 912:\n    if keyFunc and reverse:";
	pyjslib.__track_lines__[913] = "pyjslib.py, line 913:\n    def thisSort1(a,b):";
	pyjslib.__track_lines__[914] = "pyjslib.py, line 914:\n    return -compareFunc(keyFunc(a), keyFunc(b))";
	pyjslib.__track_lines__[915] = "pyjslib.py, line 915:\n    self.l.sort(thisSort1)";
	pyjslib.__track_lines__[917] = "pyjslib.py, line 917:\n    def thisSort2(a,b):";
	pyjslib.__track_lines__[918] = "pyjslib.py, line 918:\n    return compareFunc(keyFunc(a), keyFunc(b))";
	pyjslib.__track_lines__[919] = "pyjslib.py, line 919:\n    self.l.sort(thisSort2)";
	pyjslib.__track_lines__[921] = "pyjslib.py, line 921:\n    def thisSort3(a,b):";
	pyjslib.__track_lines__[922] = "pyjslib.py, line 922:\n    return -compareFunc(a, b)";
	pyjslib.__track_lines__[923] = "pyjslib.py, line 923:\n    self.l.sort(thisSort3)";
	pyjslib.__track_lines__[925] = "pyjslib.py, line 925:\n    self.l.sort(compareFunc)";
	pyjslib.__track_lines__[1449] = "pyjslib.py, line 1448:\n    @noSourceTracking ... def setattr(obj, name, value):";
	pyjslib.__track_lines__[942] = "pyjslib.py, line 942:\n    def __repr__(self):";
	pyjslib.__track_lines__[1437] = "pyjslib.py, line 1436:\n    @noSourceTracking ... def delattr(obj, name):";
	pyjslib.__track_lines__[1458] = "pyjslib.py, line 1457:\n    @noSourceTracking ... def hasattr(obj, name):";
	pyjslib.__track_lines__[1467] = "pyjslib.py, line 1466:\n    @noSourceTracking ... def dir(obj):";
	pyjslib.__track_lines__[1532] = "pyjslib.py, line 1532:\n    def max(*sequence):";
	pyjslib.__track_lines__[960] = "pyjslib.py, line 949:\n    JS(\"\"\" ... \"\"\")";
	pyjslib.__track_lines__[962] = "pyjslib.py, line 962:\n    tuple = Tuple";
	pyjslib.__track_lines__[1475] = "pyjslib.py, line 1474:\n    @noSourceTracking ... def filter(obj, method, sequence=None):";
	pyjslib.__track_lines__[965] = "pyjslib.py, line 965:\n    class Dict:";
	pyjslib.__track_lines__[247] = "pyjslib.py, line 247:\n    def __repr__(self):";
	pyjslib.__track_lines__[1273] = "pyjslib.py, line 1272:\n    @noSourceTracking ... def is_basetype(x):";
	pyjslib.__track_lines__[251] = "pyjslib.py, line 251:\n    return str(self)";
	pyjslib.__track_lines__[1511] = "pyjslib.py, line 1511:\n    def enumerate(sequence):";
	pyjslib.__track_lines__[1512] = "pyjslib.py, line 1512:\n    enumeration = []";
	pyjslib.__track_lines__[1513] = "pyjslib.py, line 1513:\n    nextIndex = 0";
	pyjslib.__track_lines__[1514] = "pyjslib.py, line 1514:\n    for item in sequence:";
	pyjslib.__track_lines__[1515] = "pyjslib.py, line 1515:\n    enumeration.append([nextIndex, item])";
	pyjslib.__track_lines__[1516] = "pyjslib.py, line 1516:\n    nextIndex = nextIndex + 1";
	pyjslib.__track_lines__[1517] = "pyjslib.py, line 1517:\n    return enumeration";
	pyjslib.__track_lines__[1533] = "pyjslib.py, line 1533:\n    if len(sequence) == 1:";
	pyjslib.__track_lines__[1520] = "pyjslib.py, line 1520:\n    def min(*sequence):";
	pyjslib.__track_lines__[1521] = "pyjslib.py, line 1521:\n    if len(sequence) == 1:";
	pyjslib.__track_lines__[1522] = "pyjslib.py, line 1522:\n    sequence = sequence[0]";
	pyjslib.__track_lines__[1523] = "pyjslib.py, line 1523:\n    minValue = None";
	pyjslib.__track_lines__[1524] = "pyjslib.py, line 1524:\n    for item in sequence:";
	pyjslib.__track_lines__[1525] = "pyjslib.py, line 1525:\n    if minValue is None:";
	pyjslib.__track_lines__[1526] = "pyjslib.py, line 1526:\n    minValue = item";
	pyjslib.__track_lines__[1528] = "pyjslib.py, line 1528:\n    minValue = item";
	pyjslib.__track_lines__[505] = "pyjslib.py, line 293:\n    JS(\"\"\" ... \"\"\")";
	pyjslib.__track_lines__[507] = "pyjslib.py, line 507:\n    class Class:";
	pyjslib.__track_lines__[508] = "pyjslib.py, line 508:\n    def __init__(self, name):";
	pyjslib.__track_lines__[509] = "pyjslib.py, line 509:\n    self.name = name";
	pyjslib.__track_lines__[1534] = "pyjslib.py, line 1534:\n    sequence = sequence[0]";
	pyjslib.__track_lines__[511] = "pyjslib.py, line 511:\n    def __str___(self):";
	track.module='pyjslib';
	track.lineno=1;
	track.lineno=18;
	track.lineno=23;
	pyjslib.import_module = function(path, parent_module, module_name, dynamic, async) {
		if (pyjs_options.arg_count && (arguments.length < 3 || arguments.length > 5)) pyjs__exception_func_param(arguments.callee.__name__, 3, 5, arguments.length);
		if (typeof dynamic == 'undefined') dynamic=1;
		if (typeof async == 'undefined') async=false;

        var cache_file;

        if (module_name == "sys" || module_name == 'pyjslib')
        {
            /*module_load_request[module_name] = 1;*/
            return;
        }

        if (path == null)
        {
            path = './';
        }

        var override_name = sys.platform + "." + module_name;
        if (((sys.overrides != null) && 
             (sys.overrides.has_key(override_name))))
        {
            cache_file =  sys.overrides.__getitem__(override_name) ;
        }
        else
        {
            cache_file =  module_name ;
        }

        cache_file = (path + cache_file + '.cache.js' ) ;

        //alert("cache " + cache_file + " " + module_name + " " + parent_module);

        /* already loaded? */
        if (module_load_request[module_name])
        {
            if (module_load_request[module_name] >= 3 && parent_module != null)
            {
                //onload_fn = parent_module + '.' + module_name + ' = ' + module_name + ';';
                //pyjs_eval(onload_fn); /* set up the parent-module namespace */
            }
            return;
        }
        if (typeof (module_load_request[module_name]) == 'undefined')
        {
            module_load_request[module_name] = 1;
        }

        /* following a load, this first executes the script 
         * "preparation" function MODULENAME_loaded_fn()
         * and then sets up the loaded module in the namespace
         * of the parent.
         */

        onload_fn = ''; // module_name + "_loaded_fn();"

        if (parent_module != null)
        {
            //onload_fn += parent_module + '.' + module_name + ' = ' + module_name + ';';
            /*pmod = parent_module + '.' + module_name;
            onload_fn += 'alert("' + pmod + '"+' + pmod+');';*/
        }


        if (dynamic)
        {
            /* this one tacks the script onto the end of the DOM
             */

            pyjs_load_script(cache_file, onload_fn, async);

            /* this one actually RUNS the script (eval) into the page.
               my feeling is that this would be better for non-async
               but i can't get it to work entirely yet.
             */
            /*pyjs_ajax_eval(cache_file, onload_fn, async);*/
        }
        else
        {
            if (module_name != "pyjslib" &&
                module_name != "sys")
                pyjs_eval(onload_fn);
        }

    
	};
	pyjslib.import_module.__name__ = 'import_module';

	pyjslib.import_module.parse_kwargs = function ( __kwargs, path, parent_module, module_name, dynamic, async ) {
		if (typeof path == 'undefined') {
			path=__kwargs.path;
			delete __kwargs.path;
		} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.path != 'undefined') {
			pyjs__exception_func_multiple_values('pyjslib.import_module', 'path');
		}
		if (typeof parent_module == 'undefined') {
			parent_module=__kwargs.parent_module;
			delete __kwargs.parent_module;
		} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.parent_module != 'undefined') {
			pyjs__exception_func_multiple_values('pyjslib.import_module', 'parent_module');
		}
		if (typeof module_name == 'undefined') {
			module_name=__kwargs.module_name;
			delete __kwargs.module_name;
		} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.module_name != 'undefined') {
			pyjs__exception_func_multiple_values('pyjslib.import_module', 'module_name');
		}
		if (typeof dynamic == 'undefined') {
			dynamic=__kwargs.dynamic;
			delete __kwargs.dynamic;
		} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.dynamic != 'undefined') {
			pyjs__exception_func_multiple_values('pyjslib.import_module', 'dynamic');
		}
		if (typeof async == 'undefined') {
			async=__kwargs.async;
			delete __kwargs.async;
		} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.async != 'undefined') {
			pyjs__exception_func_multiple_values('pyjslib.import_module', 'async');
		}
		if (pyjs_options.arg_kwarg_unexpected_keyword) {
			for (var i in __kwargs) {
				pyjs__exception_func_unexpected_keyword('pyjslib.import_module', i);
			}
		}
		var __r = [path, parent_module, module_name, dynamic, async];
		for (var pyjs__va_arg = 6;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
			__r.push(arguments[pyjs__va_arg]);
		}

		return __r;
	};
	track.lineno=110;
	pyjslib.import_wait = function(proceed_fn, parent_mod, dynamic) {
		if (pyjs_options.arg_count && arguments.length != 3) pyjs__exception_func_param(arguments.callee.__name__, 3, 3, arguments.length);


    var data = '';
    var element = $doc.createElement("div");
    $doc.body.appendChild(element);
    function write_dom(txt) {
        element.innerHTML = txt + '<br />';
    }

    var timeoutperiod = 1;
    if (dynamic)
        var timeoutperiod = 1;

    var wait = function() {

        var status = '';
        for (l in module_load_request)
        {
            var m = module_load_request[l];
            if (l == "sys" || l == 'pyjslib')
                continue;
            status += l + m + " ";
        }

        //write_dom( " import wait " + wait_count + " " + status + " parent_mod " + parent_mod);
        wait_count += 1;

        if (status == '')
        {
            setTimeout(wait, timeoutperiod);
            return;
        }

        for (l in module_load_request)
        {
            var m = module_load_request[l];
            if (l == "sys" || l == 'pyjslib')
            {
                module_load_request[l] = 4;
                continue;
            }
            if ((parent_mod != null) && (l == parent_mod))
            {
                if (m == 1)
                {
                    setTimeout(wait, timeoutperiod);
                    return;
                }
                if (m == 2)
                {
                    /* cheat and move app on to next stage */
                    module_load_request[l] = 3;
                }
            }
            if (m == 1 || m == 2)
            {
                setTimeout(wait, timeoutperiod);
                return;
            }
            if (m == 3)
            {
                //alert("waited for module " + l + ": loaded");
                module_load_request[l] = 4;
                mod_fn = modules[l];
            }
        }
        //alert("module wait done");

        if (proceed_fn.importDone)
            proceed_fn.importDone(proceed_fn);
        else
            proceed_fn();
    }

    wait();

	};
	pyjslib.import_wait.__name__ = 'import_wait';

	pyjslib.import_wait.parse_kwargs = function ( __kwargs, proceed_fn, parent_mod, dynamic ) {
		if (typeof proceed_fn == 'undefined') {
			proceed_fn=__kwargs.proceed_fn;
			delete __kwargs.proceed_fn;
		} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.proceed_fn != 'undefined') {
			pyjs__exception_func_multiple_values('pyjslib.import_wait', 'proceed_fn');
		}
		if (typeof parent_mod == 'undefined') {
			parent_mod=__kwargs.parent_mod;
			delete __kwargs.parent_mod;
		} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.parent_mod != 'undefined') {
			pyjs__exception_func_multiple_values('pyjslib.import_wait', 'parent_mod');
		}
		if (typeof dynamic == 'undefined') {
			dynamic=__kwargs.dynamic;
			delete __kwargs.dynamic;
		} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.dynamic != 'undefined') {
			pyjs__exception_func_multiple_values('pyjslib.import_wait', 'dynamic');
		}
		if (pyjs_options.arg_kwarg_unexpected_keyword) {
			for (var i in __kwargs) {
				pyjs__exception_func_unexpected_keyword('pyjslib.import_wait', i);
			}
		}
		var __r = [proceed_fn, parent_mod, dynamic];
		for (var pyjs__va_arg = 4;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
			__r.push(arguments[pyjs__va_arg]);
		}

		return __r;
	};
	track.lineno=188;
	pyjslib.object = (function(){
		var cls_instance = pyjs__class_instance('object');
		var cls_definition = new Object();
		cls_definition.__md5__ = 'f5d5b97c1e8cae67745c5d7f8f5068b3';
		return pyjs__class_function(cls_instance, cls_definition, 
		                            new Array());
	})();
	track.lineno=191;
	pyjslib.Object = pyjslib.object;
	track.lineno=193;
	pyjslib.Modload = (function(){
		var cls_instance = pyjs__class_instance('Modload');
		var cls_definition = new Object();
		cls_definition.__md5__ = 'd8a3b79aeb207fc051143df848fd8ee8';
		cls_definition.__init__ = pyjs__bind_method(cls_instance, '__init__', function(path, app_modlist, app_imported_fn, dynamic, parent_mod) {
			if (this.__is_instance__ === true) {
				var self = this;
				if (pyjs_options.arg_count && arguments.length != 5) pyjs__exception_func_param(arguments.callee.__name__, 6, 6, arguments.length+1);
			} else {
				var self = arguments[0];
				path = arguments[1];
				app_modlist = arguments[2];
				app_imported_fn = arguments[3];
				dynamic = arguments[4];
				parent_mod = arguments[5];
				if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
				if (pyjs_options.arg_count && arguments.length != 6) pyjs__exception_func_param(arguments.callee.__name__, 6, 6, arguments.length);
			}
			if (pyjs_options.arg_instance_type) {
				if (self.prototype.__md5__ !== 'd8a3b79aeb207fc051143df848fd8ee8') {
					if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
						pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					}
				}
			}
			self.app_modlist = app_modlist;
			self.app_imported_fn = app_imported_fn;
			self.path = path;
			self.idx = 0;
			self.dynamic = dynamic;
			self.parent_mod = parent_mod;
			return null;
		}
		, function ( __kwargs, path, app_modlist, app_imported_fn, dynamic, parent_mod ) {
			if (typeof path == 'undefined') {
				path=__kwargs.path;
				delete __kwargs.path;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.path != 'undefined') {
				pyjs__exception_func_multiple_values('__init__', 'path');
			}
			if (typeof app_modlist == 'undefined') {
				app_modlist=__kwargs.app_modlist;
				delete __kwargs.app_modlist;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.app_modlist != 'undefined') {
				pyjs__exception_func_multiple_values('__init__', 'app_modlist');
			}
			if (typeof app_imported_fn == 'undefined') {
				app_imported_fn=__kwargs.app_imported_fn;
				delete __kwargs.app_imported_fn;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.app_imported_fn != 'undefined') {
				pyjs__exception_func_multiple_values('__init__', 'app_imported_fn');
			}
			if (typeof dynamic == 'undefined') {
				dynamic=__kwargs.dynamic;
				delete __kwargs.dynamic;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.dynamic != 'undefined') {
				pyjs__exception_func_multiple_values('__init__', 'dynamic');
			}
			if (typeof parent_mod == 'undefined') {
				parent_mod=__kwargs.parent_mod;
				delete __kwargs.parent_mod;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.parent_mod != 'undefined') {
				pyjs__exception_func_multiple_values('__init__', 'parent_mod');
			}
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('__init__', i);
				}
			}
			var __r = [path, app_modlist, app_imported_fn, dynamic, parent_mod];
			for (var pyjs__va_arg = 6;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		});
		cls_definition.next = pyjs__bind_method(cls_instance, 'next', function() {
			if (this.__is_instance__ === true) {
				var self = this;
				if (pyjs_options.arg_count && arguments.length != 0) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length+1);
			} else {
				var self = arguments[0];
				if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
				if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length);
			}
			if (pyjs_options.arg_instance_type) {
				if (self.prototype.__md5__ !== 'd8a3b79aeb207fc051143df848fd8ee8') {
					if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
						pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					}
				}
			}
			var __i = pyjslib.range(pyjslib.len((self.app_modlist===undefined?(function(){throw new TypeError('self.app_modlist is undefined')})():(typeof self.app_modlist == 'function' && self.__is_instance__?pyjslib.getattr(self, 'app_modlist'):self.app_modlist)).__getitem__((self.idx===undefined?(function(){throw new TypeError('self.idx is undefined')})():(typeof self.idx == 'function' && self.__is_instance__?pyjslib.getattr(self, 'idx'):self.idx))))).__iter__();
			try {
				while (true) {
					var i = __i.next();
					
					var app = (self.app_modlist===undefined?(function(){throw new TypeError('self.app_modlist is undefined')})():(typeof self.app_modlist == 'function' && self.__is_instance__?pyjslib.getattr(self, 'app_modlist'):self.app_modlist)).__getitem__((self.idx===undefined?(function(){throw new TypeError('self.idx is undefined')})():(typeof self.idx == 'function' && self.__is_instance__?pyjslib.getattr(self, 'idx'):self.idx))).__getitem__(i);
					pyjslib.import_module((self.path===undefined?(function(){throw new TypeError('self.path is undefined')})():(typeof self.path == 'function' && self.__is_instance__?pyjslib.getattr(self, 'path'):self.path)), (self.parent_mod===undefined?(function(){throw new TypeError('self.parent_mod is undefined')})():(typeof self.parent_mod == 'function' && self.__is_instance__?pyjslib.getattr(self, 'parent_mod'):self.parent_mod)), app, (self.dynamic===undefined?(function(){throw new TypeError('self.dynamic is undefined')})():(typeof self.dynamic == 'function' && self.__is_instance__?pyjslib.getattr(self, 'dynamic'):self.dynamic)), true);
				}
			} catch (e) {
				if (e.__name__ != 'StopIteration') {
					throw e;
				}
			}
			self.idx += 1;
			if (pyjslib.bool((pyjslib.cmp((self.idx===undefined?(function(){throw new TypeError('self.idx is undefined')})():(typeof self.idx == 'function' && self.__is_instance__?pyjslib.getattr(self, 'idx'):self.idx)), pyjslib.len((self.app_modlist===undefined?(function(){throw new TypeError('self.app_modlist is undefined')})():(typeof self.app_modlist == 'function' && self.__is_instance__?pyjslib.getattr(self, 'app_modlist'):self.app_modlist)))) != -1))) {
				pyjslib.import_wait((self.app_imported_fn===undefined?(function(){throw new TypeError('self.app_imported_fn is undefined')})():(typeof self.app_imported_fn == 'function' && self.__is_instance__?pyjslib.getattr(self, 'app_imported_fn'):self.app_imported_fn)), (self.parent_mod===undefined?(function(){throw new TypeError('self.parent_mod is undefined')})():(typeof self.parent_mod == 'function' && self.__is_instance__?pyjslib.getattr(self, 'parent_mod'):self.parent_mod)), (self.dynamic===undefined?(function(){throw new TypeError('self.dynamic is undefined')})():(typeof self.dynamic == 'function' && self.__is_instance__?pyjslib.getattr(self, 'dynamic'):self.dynamic)));
			}
			else {
				pyjslib.import_wait(pyjslib.getattr(self, String('next')), (self.parent_mod===undefined?(function(){throw new TypeError('self.parent_mod is undefined')})():(typeof self.parent_mod == 'function' && self.__is_instance__?pyjslib.getattr(self, 'parent_mod'):self.parent_mod)), (self.dynamic===undefined?(function(){throw new TypeError('self.dynamic is undefined')})():(typeof self.dynamic == 'function' && self.__is_instance__?pyjslib.getattr(self, 'dynamic'):self.dynamic)));
			}
			return null;
		}
		, function ( __kwargs ) {
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('next', i);
				}
			}
			var __r = [];
			for (var pyjs__va_arg = 1;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		});
		return pyjs__class_function(cls_instance, cls_definition, 
		                            new Array(pyjslib.object));
	})();
	track.lineno=218;
	pyjslib.get_module = function(module_name) {
		if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length);
		track={module:'pyjslib',lineno:218};trackstack.push(track);
		track.module='pyjslib';
		track.lineno=218;
		track.lineno=219;
		var ev = pyjslib.sprintf(String('__mod = %s\x3B'), module_name);
		track.lineno=220;
pyjs_eval(ev);
		track.lineno=221;
		track.lineno=221;
		var pyjs__ret = __mod;
		trackstack.pop();track=trackstack.pop();trackstack.push(track);
		return pyjs__ret;
	};
	pyjslib.get_module.__name__ = 'get_module';

	pyjslib.get_module.parse_kwargs = function ( __kwargs, module_name ) {
		if (typeof module_name == 'undefined') {
			module_name=__kwargs.module_name;
			delete __kwargs.module_name;
		} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.module_name != 'undefined') {
			pyjs__exception_func_multiple_values('pyjslib.get_module', 'module_name');
		}
		if (pyjs_options.arg_kwarg_unexpected_keyword) {
			for (var i in __kwargs) {
				pyjs__exception_func_unexpected_keyword('pyjslib.get_module', i);
			}
		}
		var __r = [module_name];
		for (var pyjs__va_arg = 2;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
			__r.push(arguments[pyjs__va_arg]);
		}

		return __r;
	};
	track.lineno=223;
	pyjslib.preload_app_modules = function(path, app_modnames, app_imported_fn, dynamic, parent_mod) {
		if (pyjs_options.arg_count && (arguments.length < 4 || arguments.length > 5)) pyjs__exception_func_param(arguments.callee.__name__, 4, 5, arguments.length);
		if (typeof parent_mod == 'undefined') parent_mod=null;
		track={module:'pyjslib',lineno:223};trackstack.push(track);
		track.module='pyjslib';
		track.lineno=223;
		track.lineno=226;
		var loader = pyjslib.Modload(path, app_modnames, app_imported_fn, dynamic, parent_mod);
		track.lineno=227;
		loader.next();
		trackstack.pop();track=trackstack.pop();trackstack.push(track);
		return null;
	};
	pyjslib.preload_app_modules.__name__ = 'preload_app_modules';

	pyjslib.preload_app_modules.parse_kwargs = function ( __kwargs, path, app_modnames, app_imported_fn, dynamic, parent_mod ) {
		if (typeof path == 'undefined') {
			path=__kwargs.path;
			delete __kwargs.path;
		} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.path != 'undefined') {
			pyjs__exception_func_multiple_values('pyjslib.preload_app_modules', 'path');
		}
		if (typeof app_modnames == 'undefined') {
			app_modnames=__kwargs.app_modnames;
			delete __kwargs.app_modnames;
		} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.app_modnames != 'undefined') {
			pyjs__exception_func_multiple_values('pyjslib.preload_app_modules', 'app_modnames');
		}
		if (typeof app_imported_fn == 'undefined') {
			app_imported_fn=__kwargs.app_imported_fn;
			delete __kwargs.app_imported_fn;
		} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.app_imported_fn != 'undefined') {
			pyjs__exception_func_multiple_values('pyjslib.preload_app_modules', 'app_imported_fn');
		}
		if (typeof dynamic == 'undefined') {
			dynamic=__kwargs.dynamic;
			delete __kwargs.dynamic;
		} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.dynamic != 'undefined') {
			pyjs__exception_func_multiple_values('pyjslib.preload_app_modules', 'dynamic');
		}
		if (typeof parent_mod == 'undefined') {
			parent_mod=__kwargs.parent_mod;
			delete __kwargs.parent_mod;
		} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.parent_mod != 'undefined') {
			pyjs__exception_func_multiple_values('pyjslib.preload_app_modules', 'parent_mod');
		}
		if (pyjs_options.arg_kwarg_unexpected_keyword) {
			for (var i in __kwargs) {
				pyjs__exception_func_unexpected_keyword('pyjslib.preload_app_modules', i);
			}
		}
		var __r = [path, app_modnames, app_imported_fn, dynamic, parent_mod];
		for (var pyjs__va_arg = 6;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
			__r.push(arguments[pyjs__va_arg]);
		}

		return __r;
	};
	track.lineno=229;
	modules['sys'] = sys();
	pyjslib.import_module(sys.loadpath, 'pyjslib', 'sys', 0, false);
	track.module='pyjslib';

	pyjslib.sys = sys;
	track.lineno=231;
	pyjslib.BaseException = (function(){
		var cls_instance = pyjs__class_instance('BaseException');
		var cls_definition = new Object();
		cls_definition.__md5__ = '6fc5441c9ca501de5c9c41874844c6fb';
		cls_definition.message = String('')
		cls_definition.__init__ = pyjs__bind_method(cls_instance, '__init__', function() {
			if (this.__is_instance__ === true) {
				var self = this;
				var args = pyjslib.Tuple();
				for (var pyjs__va_arg = 0; pyjs__va_arg < arguments.length; pyjs__va_arg++) {
					var pyjs__arg = arguments[pyjs__va_arg];
					args.append(pyjs__arg);
				}
				if (pyjs_options.arg_count && arguments.length < 0) pyjs__exception_func_param(arguments.callee.__name__, 1, null, arguments.length+1);
			} else {
				var self = arguments[0];
				var args = pyjslib.Tuple();
				for (var pyjs__va_arg = 1; pyjs__va_arg < arguments.length; pyjs__va_arg++) {
					var pyjs__arg = arguments[pyjs__va_arg];
					args.append(pyjs__arg);
				}
				if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
				if (pyjs_options.arg_count && arguments.length < 1) pyjs__exception_func_param(arguments.callee.__name__, 1, null, arguments.length);
			}
			if (pyjs_options.arg_instance_type) {
				if (self.prototype.__md5__ !== '6fc5441c9ca501de5c9c41874844c6fb') {
					if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
						pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					}
				}
			}
			track={module:pyjslib, lineno:235};trackstack.push(track);
			track.module='pyjslib';
			track.lineno=235;
			track.lineno=236;
			self.args = args;
			track.lineno=237;
			if (pyjslib.bool(pyjslib.eq(pyjslib.len(args), 1))) {
				track.lineno=238;
				self.message = args.__getitem__(0);
			}
			trackstack.pop();track=trackstack.pop();trackstack.push(track);
			return null;
		}
		, function ( __kwargs ) {
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('__init__', i);
				}
			}
			var __r = [];
			for (var pyjs__va_arg = 1;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		});
		cls_definition.__str__ = pyjs__bind_method(cls_instance, '__str__', function() {
			if (this.__is_instance__ === true) {
				var self = this;
				if (pyjs_options.arg_count && arguments.length != 0) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length+1);
			} else {
				var self = arguments[0];
				if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
				if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length);
			}
			if (pyjs_options.arg_instance_type) {
				if (self.prototype.__md5__ !== '6fc5441c9ca501de5c9c41874844c6fb') {
					if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
						pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					}
				}
			}
			track={module:pyjslib, lineno:240};trackstack.push(track);
			track.module='pyjslib';
			track.lineno=240;
			track.lineno=241;
			if (pyjslib.bool((pyjslib.len((self.args===undefined?(function(){throw new TypeError('self.args is undefined')})():(typeof self.args == 'function' && self.__is_instance__?pyjslib.getattr(self, 'args'):self.args))) === 0))) {
				track.lineno=242;
				track.lineno=242;
				var pyjs__ret = String('');
				trackstack.pop();track=trackstack.pop();trackstack.push(track);
				return pyjs__ret;
			}
			else if (pyjslib.bool((pyjslib.len((self.args===undefined?(function(){throw new TypeError('self.args is undefined')})():(typeof self.args == 'function' && self.__is_instance__?pyjslib.getattr(self, 'args'):self.args))) === 1))) {
				track.lineno=244;
				track.lineno=244;
				var pyjs__ret = pyjslib.str((self.message===undefined?(function(){throw new TypeError('self.message is undefined')})():(typeof self.message == 'function' && self.__is_instance__?pyjslib.getattr(self, 'message'):self.message)));
				trackstack.pop();track=trackstack.pop();trackstack.push(track);
				return pyjs__ret;
			}
			track.lineno=245;
			track.lineno=245;
			var pyjs__ret = pyjslib.repr((self.args===undefined?(function(){throw new TypeError('self.args is undefined')})():(typeof self.args == 'function' && self.__is_instance__?pyjslib.getattr(self, 'args'):self.args)));
			trackstack.pop();track=trackstack.pop();trackstack.push(track);
			return pyjs__ret;
		}
		, function ( __kwargs ) {
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('__str__', i);
				}
			}
			var __r = [];
			for (var pyjs__va_arg = 1;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		});
		cls_definition.__repr__ = pyjs__bind_method(cls_instance, '__repr__', function() {
			if (this.__is_instance__ === true) {
				var self = this;
				if (pyjs_options.arg_count && arguments.length != 0) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length+1);
			} else {
				var self = arguments[0];
				if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
				if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length);
			}
			if (pyjs_options.arg_instance_type) {
				if (self.prototype.__md5__ !== '6fc5441c9ca501de5c9c41874844c6fb') {
					if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
						pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					}
				}
			}
			track={module:pyjslib, lineno:247};trackstack.push(track);
			track.module='pyjslib';
			track.lineno=247;
			track.lineno=248;
			track.lineno=248;
			var pyjs__ret =  ( (self.__name__===undefined?(function(){throw new TypeError('self.__name__ is undefined')})():(typeof self.__name__ == 'function' && self.__is_instance__?pyjslib.getattr(self, '__name__'):self.__name__)) + pyjslib.repr((self.args===undefined?(function(){throw new TypeError('self.args is undefined')})():(typeof self.args == 'function' && self.__is_instance__?pyjslib.getattr(self, 'args'):self.args))) ) ;
			trackstack.pop();track=trackstack.pop();trackstack.push(track);
			return pyjs__ret;
		}
		, function ( __kwargs ) {
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('__repr__', i);
				}
			}
			var __r = [];
			for (var pyjs__va_arg = 1;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		});
		cls_definition.toString = pyjs__bind_method(cls_instance, 'toString', function() {
			if (this.__is_instance__ === true) {
				var self = this;
				if (pyjs_options.arg_count && arguments.length != 0) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length+1);
			} else {
				var self = arguments[0];
				if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
				if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length);
			}
			if (pyjs_options.arg_instance_type) {
				if (self.prototype.__md5__ !== '6fc5441c9ca501de5c9c41874844c6fb') {
					if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
						pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					}
				}
			}
			track={module:pyjslib, lineno:250};trackstack.push(track);
			track.module='pyjslib';
			track.lineno=250;
			track.lineno=251;
			track.lineno=251;
			var pyjs__ret = pyjslib.str(self);
			trackstack.pop();track=trackstack.pop();trackstack.push(track);
			return pyjs__ret;
		}
		, function ( __kwargs ) {
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('toString', i);
				}
			}
			var __r = [];
			for (var pyjs__va_arg = 1;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		});
		return pyjs__class_function(cls_instance, cls_definition, 
		                            new Array(pyjslib.object));
	})();
	track.lineno=253;
	pyjslib.Exception = (function(){
		var cls_instance = pyjs__class_instance('Exception');
		var cls_definition = new Object();
		cls_definition.__md5__ = 'c130f58334ab6fcbadd72111964ad3f1';
		return pyjs__class_function(cls_instance, cls_definition, 
		                            new Array(pyjslib.BaseException));
	})();
	track.lineno=256;
	pyjslib.StandardError = (function(){
		var cls_instance = pyjs__class_instance('StandardError');
		var cls_definition = new Object();
		cls_definition.__md5__ = '3377ec933b775512da98ebb094335941';
		return pyjs__class_function(cls_instance, cls_definition, 
		                            new Array(pyjslib.Exception));
	})();
	track.lineno=259;
	pyjslib.TypeError = (function(){
		var cls_instance = pyjs__class_instance('TypeError');
		var cls_definition = new Object();
		cls_definition.__md5__ = 'f98d02f35676442f9a053f295376f3db';
		return pyjs__class_function(cls_instance, cls_definition, 
		                            new Array(pyjslib.StandardError));
	})();
	track.lineno=262;
	pyjslib.LookupError = (function(){
		var cls_instance = pyjs__class_instance('LookupError');
		var cls_definition = new Object();
		cls_definition.__md5__ = '22f0cbb5b6166b6ad86723aad193ec71';
		cls_definition.toString = pyjs__bind_method(cls_instance, 'toString', function() {
			if (this.__is_instance__ === true) {
				var self = this;
				if (pyjs_options.arg_count && arguments.length != 0) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length+1);
			} else {
				var self = arguments[0];
				if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
				if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length);
			}
			if (pyjs_options.arg_instance_type) {
				if (self.prototype.__md5__ !== '22f0cbb5b6166b6ad86723aad193ec71') {
					if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
						pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					}
				}
			}
			track={module:pyjslib, lineno:264};trackstack.push(track);
			track.module='pyjslib';
			track.lineno=264;
			track.lineno=265;
			track.lineno=265;
			var pyjs__ret =  (  ( (self.__name__===undefined?(function(){throw new TypeError('self.__name__ is undefined')})():(typeof self.__name__ == 'function' && self.__is_instance__?pyjslib.getattr(self, '__name__'):self.__name__)) + String(': ') )  + (self.args===undefined?(function(){throw new TypeError('self.args is undefined')})():(typeof self.args == 'function' && self.__is_instance__?pyjslib.getattr(self, 'args'):self.args)).__getitem__(0) ) ;
			trackstack.pop();track=trackstack.pop();trackstack.push(track);
			return pyjs__ret;
		}
		, function ( __kwargs ) {
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('toString', i);
				}
			}
			var __r = [];
			for (var pyjs__va_arg = 1;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		});
		return pyjs__class_function(cls_instance, cls_definition, 
		                            new Array(pyjslib.StandardError));
	})();
	track.lineno=267;
	pyjslib.KeyError = (function(){
		var cls_instance = pyjs__class_instance('KeyError');
		var cls_definition = new Object();
		cls_definition.__md5__ = '20522047291df89f351ad575cc99687b';
		cls_definition.__str__ = pyjs__bind_method(cls_instance, '__str__', function() {
			if (this.__is_instance__ === true) {
				var self = this;
				if (pyjs_options.arg_count && arguments.length != 0) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length+1);
			} else {
				var self = arguments[0];
				if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
				if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length);
			}
			if (pyjs_options.arg_instance_type) {
				if (self.prototype.__md5__ !== '20522047291df89f351ad575cc99687b') {
					if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
						pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					}
				}
			}
			track={module:pyjslib, lineno:269};trackstack.push(track);
			track.module='pyjslib';
			track.lineno=269;
			track.lineno=270;
			if (pyjslib.bool((pyjslib.len((self.args===undefined?(function(){throw new TypeError('self.args is undefined')})():(typeof self.args == 'function' && self.__is_instance__?pyjslib.getattr(self, 'args'):self.args))) === 0))) {
				track.lineno=271;
				track.lineno=271;
				var pyjs__ret = String('');
				trackstack.pop();track=trackstack.pop();trackstack.push(track);
				return pyjs__ret;
			}
			else if (pyjslib.bool((pyjslib.len((self.args===undefined?(function(){throw new TypeError('self.args is undefined')})():(typeof self.args == 'function' && self.__is_instance__?pyjslib.getattr(self, 'args'):self.args))) === 1))) {
				track.lineno=273;
				track.lineno=273;
				var pyjs__ret = pyjslib.repr((self.message===undefined?(function(){throw new TypeError('self.message is undefined')})():(typeof self.message == 'function' && self.__is_instance__?pyjslib.getattr(self, 'message'):self.message)));
				trackstack.pop();track=trackstack.pop();trackstack.push(track);
				return pyjs__ret;
			}
			track.lineno=274;
			track.lineno=274;
			var pyjs__ret = pyjslib.repr((self.args===undefined?(function(){throw new TypeError('self.args is undefined')})():(typeof self.args == 'function' && self.__is_instance__?pyjslib.getattr(self, 'args'):self.args)));
			trackstack.pop();track=trackstack.pop();trackstack.push(track);
			return pyjs__ret;
		}
		, function ( __kwargs ) {
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('__str__', i);
				}
			}
			var __r = [];
			for (var pyjs__va_arg = 1;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		});
		return pyjs__class_function(cls_instance, cls_definition, 
		                            new Array(pyjslib.LookupError));
	})();
	track.lineno=276;
	pyjslib.AttributeError = (function(){
		var cls_instance = pyjs__class_instance('AttributeError');
		var cls_definition = new Object();
		cls_definition.__md5__ = '3ed24a64e3e36737f6c25e0508309915';
		cls_definition.toString = pyjs__bind_method(cls_instance, 'toString', function() {
			if (this.__is_instance__ === true) {
				var self = this;
				if (pyjs_options.arg_count && arguments.length != 0) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length+1);
			} else {
				var self = arguments[0];
				if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
				if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length);
			}
			if (pyjs_options.arg_instance_type) {
				if (self.prototype.__md5__ !== '3ed24a64e3e36737f6c25e0508309915') {
					if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
						pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					}
				}
			}
			track={module:pyjslib, lineno:278};trackstack.push(track);
			track.module='pyjslib';
			track.lineno=278;
			track.lineno=279;
			track.lineno=279;
			var pyjs__ret = pyjslib.sprintf(String('AttributeError: %s of %s'), new pyjslib.Tuple([(self.args===undefined?(function(){throw new TypeError('self.args is undefined')})():(typeof self.args == 'function' && self.__is_instance__?pyjslib.getattr(self, 'args'):self.args)).__getitem__(1), (self.args===undefined?(function(){throw new TypeError('self.args is undefined')})():(typeof self.args == 'function' && self.__is_instance__?pyjslib.getattr(self, 'args'):self.args)).__getitem__(0)]));
			trackstack.pop();track=trackstack.pop();trackstack.push(track);
			return pyjs__ret;
		}
		, function ( __kwargs ) {
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('toString', i);
				}
			}
			var __r = [];
			for (var pyjs__va_arg = 1;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		});
		return pyjs__class_function(cls_instance, cls_definition, 
		                            new Array(pyjslib.StandardError));
	})();
	track.lineno=281;
	pyjslib.NameError = (function(){
		var cls_instance = pyjs__class_instance('NameError');
		var cls_definition = new Object();
		cls_definition.__md5__ = 'de57b8f49b0ed2448ff4ea4085392466';
		return pyjs__class_function(cls_instance, cls_definition, 
		                            new Array(pyjslib.StandardError));
	})();
	track.lineno=284;
	pyjslib.ValueError = (function(){
		var cls_instance = pyjs__class_instance('ValueError');
		var cls_definition = new Object();
		cls_definition.__md5__ = 'bb48fd9d3648265c609ec1b7360de294';
		return pyjs__class_function(cls_instance, cls_definition, 
		                            new Array(pyjslib.StandardError));
	})();
	track.lineno=287;
	pyjslib.IndexError = (function(){
		var cls_instance = pyjs__class_instance('IndexError');
		var cls_definition = new Object();
		cls_definition.__md5__ = '2be1d453e67f2382f948d133f5bcf2c3';
		return pyjs__class_function(cls_instance, cls_definition, 
		                            new Array(pyjslib.LookupError));
	})();
	track.lineno=505;

pyjslib._errorMapping = function(err) {
    if (err instanceof(ReferenceError) || err instanceof(TypeError)) {
        var message = ''
        try {
            message = err.message;
        } catch ( e) {
        }
        return pyjslib.AttributeError(message);
    }
    return err
}

pyjslib.TryElse = function () { };
pyjslib.TryElse.prototype = new Error();
pyjslib.TryElse.__name__ = 'TryElse';
pyjslib.TryElse.message = 'TryElse';

pyjslib.StopIteration = function () { };
pyjslib.StopIteration.prototype = new Error();
pyjslib.StopIteration.__name__ = 'StopIteration';
pyjslib.StopIteration.message = 'StopIteration';

pyjslib.String_find = function(sub, start, end) {
    var pos=this.indexOf(sub, start);
    if (pyjslib.isUndefined(end)) return pos;

    if (pos + sub.length>end) return -1;
    return pos;
}

pyjslib.String_join = function(data) {
    var text="";

    if (pyjslib.isArray(data)) {
        return data.join(this);
    }
    else if (pyjslib.isIteratable(data)) {
        var iter=data.__iter__();
        try {
            text+=iter.next();
            while (true) {
                var item=iter.next();
                text+=this + item;
            }
        }
        catch (e) {
            if (e.__name__ != 'StopIteration') throw e;
        }
    }

    return text;
}

pyjslib.String_isdigit = function() {
    return (this.match(/^\d+$/g) != null);
}

pyjslib.String_replace = function(old, replace, count) {
    var do_max=false;
    var start=0;
    var new_str="";
    var pos=0;

    if (!pyjslib.isString(old)) return this.__replace(old, replace);
    if (!pyjslib.isUndefined(count)) do_max=true;

    while (start<this.length) {
        if (do_max && !count--) break;

        pos=this.indexOf(old, start);
        if (pos<0) break;

        new_str+=this.substring(start, pos) + replace;
        start=pos+old.length;
    }
    if (start<this.length) new_str+=this.substring(start);

    return new_str;
}

pyjslib.String_split = function(sep, maxsplit) {
    var items=new pyjslib.List();
    var do_max=false;
    var subject=this;
    var start=0;
    var pos=0;

    if (pyjslib.isUndefined(sep) || pyjslib.isNull(sep)) {
        sep=" ";
        subject=subject.strip();
        subject=subject.replace(/\s+/g, sep);
    }
    else if (!pyjslib.isUndefined(maxsplit)) do_max=true;

    if (subject.length == 0) {
        return items;
    }

    while (start<subject.length) {
        if (do_max && !maxsplit--) break;

        pos=subject.indexOf(sep, start);
        if (pos<0) break;

        items.append(subject.substring(start, pos));
        start=pos+sep.length;
    }
    if (start<=subject.length) items.append(subject.substring(start));

    return items;
}

pyjslib.String___iter__ = function() {
    var i = 0;
    var s = this;
    return {
        'next': function() {
            if (i >= s.length) {
                throw pyjslib.StopIteration;
            }
            return s.substring(i++, i, 1);
        },
        '__iter__': function() {
            return this;
        }
    };
}

pyjslib.String_strip = function(chars) {
    return this.lstrip(chars).rstrip(chars);
}

pyjslib.String_lstrip = function(chars) {
    if (pyjslib.isUndefined(chars)) return this.replace(/^\s+/, "");

    return this.replace(new RegExp("^[" + chars + "]+"), "");
}

pyjslib.String_rstrip = function(chars) {
    if (pyjslib.isUndefined(chars)) return this.replace(/\s+$/, "");

    return this.replace(new RegExp("[" + chars + "]+$"), "");
}

pyjslib.String_startswith = function(prefix, start, end) {
    // FIXME: accept tuples as suffix (since 2.5)
    if (pyjslib.isUndefined(start)) start = 0;
    if (pyjslib.isUndefined(end)) end = this.length;

    if ((end - start) < prefix.length) return false
    if (this.substr(start, prefix.length) == prefix) return true;
    return false;
}

pyjslib.String_endswith = function(suffix, start, end) {
    // FIXME: accept tuples as suffix (since 2.5)
    if (pyjslib.isUndefined(start)) start = 0;
    if (pyjslib.isUndefined(end)) end = this.length;

    if ((end - start) < suffix.length) return false
    if (this.substr(end - suffix.length, suffix.length) == suffix) return true;
    return false;
}

pyjslib.String_ljust = function(width, fillchar) {
    if (typeof(width) != 'number' ||
        parseInt(width) != width) {
        throw (pyjslib.TypeError("an integer is required"));
    }
    if (pyjslib.isUndefined(fillchar)) fillchar = ' ';
    if (typeof(fillchar) != 'string' ||
        fillchar.length != 1) {
        throw (pyjslib.TypeError("ljust() argument 2 must be char, not " + typeof(fillchar)));
    }
    if (this.length >= width) return this;
    return this + new Array(width+1 - this.length).join(fillchar);
}

pyjslib.String_rjust = function(width, fillchar) {
    if (typeof(width) != 'number' ||
        parseInt(width) != width) {
        throw (pyjslib.TypeError("an integer is required"));
    }
    if (pyjslib.isUndefined(fillchar)) fillchar = ' ';
    if (typeof(fillchar) != 'string' ||
        fillchar.length != 1) {
        throw (pyjslib.TypeError("rjust() argument 2 must be char, not " + typeof(fillchar)));
    }
    if (this.length >= width) return this;
    return new Array(width + 1 - this.length).join(fillchar) + this;
}

pyjslib.String_center = function(width, fillchar) {
    if (typeof(width) != 'number' ||
        parseInt(width) != width) {
        throw (pyjslib.TypeError("an integer is required"));
    }
    if (pyjslib.isUndefined(fillchar)) fillchar = ' ';
    if (typeof(fillchar) != 'string' ||
        fillchar.length != 1) {
        throw (pyjslib.TypeError("center() argument 2 must be char, not " + typeof(fillchar)));
    }
    if (this.length >= width) return this;
    padlen = width - this.length
    right = Math.ceil(padlen / 2);
    left = padlen - right;
    return new Array(left+1).join(fillchar) + this + new Array(right+1).join(fillchar);
}

pyjslib.abs = Math.abs;


	track.lineno=507;
	pyjslib.Class = (function(){
		var cls_instance = pyjs__class_instance('Class');
		var cls_definition = new Object();
		cls_definition.__md5__ = 'e4df5dc275adc4d87bf294e2b3abc47a';
		cls_definition.__init__ = pyjs__bind_method(cls_instance, '__init__', function(name) {
			if (this.__is_instance__ === true) {
				var self = this;
				if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 2, 2, arguments.length+1);
			} else {
				var self = arguments[0];
				name = arguments[1];
				if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
				if (pyjs_options.arg_count && arguments.length != 2) pyjs__exception_func_param(arguments.callee.__name__, 2, 2, arguments.length);
			}
			if (pyjs_options.arg_instance_type) {
				if (self.prototype.__md5__ !== 'e4df5dc275adc4d87bf294e2b3abc47a') {
					if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
						pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					}
				}
			}
			track={module:pyjslib, lineno:508};trackstack.push(track);
			track.module='pyjslib';
			track.lineno=508;
			track.lineno=509;
			self.name_ = name;
			trackstack.pop();track=trackstack.pop();trackstack.push(track);
			return null;
		}
		, function ( __kwargs, name ) {
			if (typeof name == 'undefined') {
				name=__kwargs.name;
				delete __kwargs.name;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.name != 'undefined') {
				pyjs__exception_func_multiple_values('__init__', 'name');
			}
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('__init__', i);
				}
			}
			var __r = [name];
			for (var pyjs__va_arg = 2;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		});
		cls_definition.__str___ = pyjs__bind_method(cls_instance, '__str___', function() {
			if (this.__is_instance__ === true) {
				var self = this;
				if (pyjs_options.arg_count && arguments.length != 0) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length+1);
			} else {
				var self = arguments[0];
				if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
				if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length);
			}
			if (pyjs_options.arg_instance_type) {
				if (self.prototype.__md5__ !== 'e4df5dc275adc4d87bf294e2b3abc47a') {
					if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
						pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					}
				}
			}
			track={module:pyjslib, lineno:511};trackstack.push(track);
			track.module='pyjslib';
			track.lineno=511;
			track.lineno=512;
			track.lineno=512;
			var pyjs__ret = (self.name_===undefined?(function(){throw new TypeError('self.name_ is undefined')})():(typeof self.name_ == 'function' && self.__is_instance__?pyjslib.getattr(self, 'name_'):self.name_));
			trackstack.pop();track=trackstack.pop();trackstack.push(track);
			return pyjs__ret;
		}
		, function ( __kwargs ) {
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('__str___', i);
				}
			}
			var __r = [];
			for (var pyjs__va_arg = 1;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		});
		return pyjs__class_function(cls_instance, cls_definition, 
		                            new Array(pyjslib.object));
	})();
	track.lineno=515;
	pyjslib.eq = function(a, b) {
		if (pyjs_options.arg_count && arguments.length != 2) pyjs__exception_func_param(arguments.callee.__name__, 2, 2, arguments.length);

    if (a === null) {
        if (b === null) return true;
        return false;
    }
    if (b === null) {
        return false;
    }
    if ((typeof a == 'object' || typeof a == 'function') && typeof a.__cmp__ == 'function') {
        return a.__cmp__(b) == 0;
    } else if ((typeof b == 'object' || typeof b == 'function') && typeof b.__cmp__ == 'function') {
        return b.__cmp__(a) == 0;
    }
    return a == b;
    
	};
	pyjslib.eq.__name__ = 'eq';

	pyjslib.eq.parse_kwargs = function ( __kwargs, a, b ) {
		if (typeof a == 'undefined') {
			a=__kwargs.a;
			delete __kwargs.a;
		} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.a != 'undefined') {
			pyjs__exception_func_multiple_values('pyjslib.eq', 'a');
		}
		if (typeof b == 'undefined') {
			b=__kwargs.b;
			delete __kwargs.b;
		} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.b != 'undefined') {
			pyjs__exception_func_multiple_values('pyjslib.eq', 'b');
		}
		if (pyjs_options.arg_kwarg_unexpected_keyword) {
			for (var i in __kwargs) {
				pyjs__exception_func_unexpected_keyword('pyjslib.eq', i);
			}
		}
		var __r = [a, b];
		for (var pyjs__va_arg = 3;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
			__r.push(arguments[pyjs__va_arg]);
		}

		return __r;
	};
	track.lineno=536;
	pyjslib.cmp = function(a, b) {
		if (pyjs_options.arg_count && arguments.length != 2) pyjs__exception_func_param(arguments.callee.__name__, 2, 2, arguments.length);

    if (a === null) {
        if (b === null) return 0;
        return -1;
    }
    if (b === null) {
        return 1;
    }
    if ((typeof a == 'object' || typeof a == 'function') && typeof a.__cmp__ == 'function') {
        return a.__cmp__(b);
    } else if ((typeof b == 'object' || typeof b == 'function') && typeof b.__cmp__ == 'function') {
        return -b.__cmp__(a);
    }
    if (a > b) return 1;
    if (b > a) return -1;
    return 0;
    
	};
	pyjslib.cmp.__name__ = 'cmp';

	pyjslib.cmp.parse_kwargs = function ( __kwargs, a, b ) {
		if (typeof a == 'undefined') {
			a=__kwargs.a;
			delete __kwargs.a;
		} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.a != 'undefined') {
			pyjs__exception_func_multiple_values('pyjslib.cmp', 'a');
		}
		if (typeof b == 'undefined') {
			b=__kwargs.b;
			delete __kwargs.b;
		} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.b != 'undefined') {
			pyjs__exception_func_multiple_values('pyjslib.cmp', 'b');
		}
		if (pyjs_options.arg_kwarg_unexpected_keyword) {
			for (var i in __kwargs) {
				pyjs__exception_func_unexpected_keyword('pyjslib.cmp', i);
			}
		}
		var __r = [a, b];
		for (var pyjs__va_arg = 3;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
			__r.push(arguments[pyjs__va_arg]);
		}

		return __r;
	};
	track.lineno=556;
	pyjslib.bool = function(v) {
		if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length);

    if (!v) return false;
    switch(typeof v){
    case 'boolean':
        return v;
    case 'object':
        if (v.__nonzero__){
            return v.__nonzero__();
        }else if (v.__len__){
            return v.__len__()>0;
        }
        return true;
    }
    return Boolean(v);
    
	};
	pyjslib.bool.__name__ = 'bool';

	pyjslib.bool.parse_kwargs = function ( __kwargs, v ) {
		if (typeof v == 'undefined') {
			v=__kwargs.v;
			delete __kwargs.v;
		} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.v != 'undefined') {
			pyjs__exception_func_multiple_values('pyjslib.bool', 'v');
		}
		if (pyjs_options.arg_kwarg_unexpected_keyword) {
			for (var i in __kwargs) {
				pyjs__exception_func_unexpected_keyword('pyjslib.bool', i);
			}
		}
		var __r = [v];
		for (var pyjs__va_arg = 2;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
			__r.push(arguments[pyjs__va_arg]);
		}

		return __r;
	};
	track.lineno=576;
	pyjslib.List = (function(){
		var cls_instance = pyjs__class_instance('List');
		var cls_definition = new Object();
		cls_definition.__md5__ = '456cea168118485433b934b8ef4974b4';
		cls_definition.__init__ = pyjs__bind_method(cls_instance, '__init__', function(data) {
			if (this.__is_instance__ === true) {
				var self = this;
				if (pyjs_options.arg_count && (arguments.length < 0 || arguments.length > 1)) pyjs__exception_func_param(arguments.callee.__name__, 1, 2, arguments.length+1);
			} else {
				var self = arguments[0];
				data = arguments[1];
				if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
				if (pyjs_options.arg_count && (arguments.length < 1 || arguments.length > 2)) pyjs__exception_func_param(arguments.callee.__name__, 1, 2, arguments.length);
			}
			if (pyjs_options.arg_instance_type) {
				if (self.prototype.__md5__ !== '456cea168118485433b934b8ef4974b4') {
					if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
						pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					}
				}
			}
			if (typeof data == 'undefined') data=null;

        this.l = [];
        this.extend(data);
        
		}
		, function ( __kwargs, data ) {
			if (typeof data == 'undefined') {
				data=__kwargs.data;
				delete __kwargs.data;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.data != 'undefined') {
				pyjs__exception_func_multiple_values('__init__', 'data');
			}
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('__init__', i);
				}
			}
			var __r = [data];
			for (var pyjs__va_arg = 2;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		});
		cls_definition.append = pyjs__bind_method(cls_instance, 'append', function(item) {
			if (this.__is_instance__ === true) {
				var self = this;
				if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 2, 2, arguments.length+1);
			} else {
				var self = arguments[0];
				item = arguments[1];
				if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
				if (pyjs_options.arg_count && arguments.length != 2) pyjs__exception_func_param(arguments.callee.__name__, 2, 2, arguments.length);
			}
			if (pyjs_options.arg_instance_type) {
				if (self.prototype.__md5__ !== '456cea168118485433b934b8ef4974b4') {
					if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
						pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					}
				}
			}
    this.l[this.l.length] = item;
		}
		, function ( __kwargs, item ) {
			if (typeof item == 'undefined') {
				item=__kwargs.item;
				delete __kwargs.item;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.item != 'undefined') {
				pyjs__exception_func_multiple_values('append', 'item');
			}
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('append', i);
				}
			}
			var __r = [item];
			for (var pyjs__va_arg = 2;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		});
		cls_definition.extend = pyjs__bind_method(cls_instance, 'extend', function(data) {
			if (this.__is_instance__ === true) {
				var self = this;
				if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 2, 2, arguments.length+1);
			} else {
				var self = arguments[0];
				data = arguments[1];
				if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
				if (pyjs_options.arg_count && arguments.length != 2) pyjs__exception_func_param(arguments.callee.__name__, 2, 2, arguments.length);
			}
			if (pyjs_options.arg_instance_type) {
				if (self.prototype.__md5__ !== '456cea168118485433b934b8ef4974b4') {
					if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
						pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					}
				}
			}

        if (pyjslib.isArray(data)) {
            n = this.l.length;
            for (var i=0; i < data.length; i++) {
                this.l[n+i]=data[i];
                }
            }
        else if (pyjslib.isIteratable(data)) {
            var iter=data.__iter__();
            var i=this.l.length;
            try {
                while (true) {
                    var item=iter.next();
                    this.l[i++]=item;
                    }
                }
            catch (e) {
                if (e.__name__ != 'StopIteration') throw e;
                }
            }
        
		}
		, function ( __kwargs, data ) {
			if (typeof data == 'undefined') {
				data=__kwargs.data;
				delete __kwargs.data;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.data != 'undefined') {
				pyjs__exception_func_multiple_values('extend', 'data');
			}
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('extend', i);
				}
			}
			var __r = [data];
			for (var pyjs__va_arg = 2;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		});
		cls_definition.remove = pyjs__bind_method(cls_instance, 'remove', function(value) {
			if (this.__is_instance__ === true) {
				var self = this;
				if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 2, 2, arguments.length+1);
			} else {
				var self = arguments[0];
				value = arguments[1];
				if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
				if (pyjs_options.arg_count && arguments.length != 2) pyjs__exception_func_param(arguments.callee.__name__, 2, 2, arguments.length);
			}
			if (pyjs_options.arg_instance_type) {
				if (self.prototype.__md5__ !== '456cea168118485433b934b8ef4974b4') {
					if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
						pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					}
				}
			}

        var index=this.index(value);
        if (index<0) return false;
        this.l.splice(index, 1);
        return true;
        
		}
		, function ( __kwargs, value ) {
			if (typeof value == 'undefined') {
				value=__kwargs.value;
				delete __kwargs.value;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.value != 'undefined') {
				pyjs__exception_func_multiple_values('remove', 'value');
			}
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('remove', i);
				}
			}
			var __r = [value];
			for (var pyjs__va_arg = 2;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		});
		cls_definition.index = pyjs__bind_method(cls_instance, 'index', function(value, start) {
			if (this.__is_instance__ === true) {
				var self = this;
				if (pyjs_options.arg_count && (arguments.length < 1 || arguments.length > 2)) pyjs__exception_func_param(arguments.callee.__name__, 2, 3, arguments.length+1);
			} else {
				var self = arguments[0];
				value = arguments[1];
				start = arguments[2];
				if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
				if (pyjs_options.arg_count && (arguments.length < 2 || arguments.length > 3)) pyjs__exception_func_param(arguments.callee.__name__, 2, 3, arguments.length);
			}
			if (pyjs_options.arg_instance_type) {
				if (self.prototype.__md5__ !== '456cea168118485433b934b8ef4974b4') {
					if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
						pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					}
				}
			}
			if (typeof start == 'undefined') start=0;

        return this.l.indexOf(value, start);
        
		}
		, function ( __kwargs, value, start ) {
			if (typeof value == 'undefined') {
				value=__kwargs.value;
				delete __kwargs.value;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.value != 'undefined') {
				pyjs__exception_func_multiple_values('index', 'value');
			}
			if (typeof start == 'undefined') {
				start=__kwargs.start;
				delete __kwargs.start;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.start != 'undefined') {
				pyjs__exception_func_multiple_values('index', 'start');
			}
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('index', i);
				}
			}
			var __r = [value, start];
			for (var pyjs__va_arg = 3;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		});
		cls_definition.insert = pyjs__bind_method(cls_instance, 'insert', function(index, value) {
			if (this.__is_instance__ === true) {
				var self = this;
				if (pyjs_options.arg_count && arguments.length != 2) pyjs__exception_func_param(arguments.callee.__name__, 3, 3, arguments.length+1);
			} else {
				var self = arguments[0];
				index = arguments[1];
				value = arguments[2];
				if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
				if (pyjs_options.arg_count && arguments.length != 3) pyjs__exception_func_param(arguments.callee.__name__, 3, 3, arguments.length);
			}
			if (pyjs_options.arg_instance_type) {
				if (self.prototype.__md5__ !== '456cea168118485433b934b8ef4974b4') {
					if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
						pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					}
				}
			}
    var a = this.l; this.l=a.slice(0, index).concat(value, a.slice(index));
		}
		, function ( __kwargs, index, value ) {
			if (typeof index == 'undefined') {
				index=__kwargs.index;
				delete __kwargs.index;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.index != 'undefined') {
				pyjs__exception_func_multiple_values('insert', 'index');
			}
			if (typeof value == 'undefined') {
				value=__kwargs.value;
				delete __kwargs.value;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.value != 'undefined') {
				pyjs__exception_func_multiple_values('insert', 'value');
			}
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('insert', i);
				}
			}
			var __r = [index, value];
			for (var pyjs__va_arg = 3;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		});
		cls_definition.pop = pyjs__bind_method(cls_instance, 'pop', function(index) {
			if (this.__is_instance__ === true) {
				var self = this;
				if (pyjs_options.arg_count && (arguments.length < 0 || arguments.length > 1)) pyjs__exception_func_param(arguments.callee.__name__, 1, 2, arguments.length+1);
			} else {
				var self = arguments[0];
				index = arguments[1];
				if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
				if (pyjs_options.arg_count && (arguments.length < 1 || arguments.length > 2)) pyjs__exception_func_param(arguments.callee.__name__, 1, 2, arguments.length);
			}
			if (pyjs_options.arg_instance_type) {
				if (self.prototype.__md5__ !== '456cea168118485433b934b8ef4974b4') {
					if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
						pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					}
				}
			}
			if (typeof index == 'undefined') index=-1;

        if (index<0) index = this.l.length + index;
        var a = this.l[index];
        this.l.splice(index, 1);
        return a;
        
		}
		, function ( __kwargs, index ) {
			if (typeof index == 'undefined') {
				index=__kwargs.index;
				delete __kwargs.index;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.index != 'undefined') {
				pyjs__exception_func_multiple_values('pop', 'index');
			}
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('pop', i);
				}
			}
			var __r = [index];
			for (var pyjs__va_arg = 2;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		});
		cls_definition.__cmp__ = pyjs__bind_method(cls_instance, '__cmp__', function(l) {
			if (this.__is_instance__ === true) {
				var self = this;
				if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 2, 2, arguments.length+1);
			} else {
				var self = arguments[0];
				l = arguments[1];
				if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
				if (pyjs_options.arg_count && arguments.length != 2) pyjs__exception_func_param(arguments.callee.__name__, 2, 2, arguments.length);
			}
			if (pyjs_options.arg_instance_type) {
				if (self.prototype.__md5__ !== '456cea168118485433b934b8ef4974b4') {
					if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
						pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					}
				}
			}
			if (pyjslib.bool(!(pyjslib.isinstance(l, pyjslib.List)))) {
				return -1;
			}
			var ll =  ( pyjslib.len(self) - pyjslib.len(l) ) ;
			if (pyjslib.bool((ll != 0))) {
				return ll;
			}
			var __x = pyjslib.range(pyjslib.len(l)).__iter__();
			try {
				while (true) {
					var x = __x.next();
					
					ll = pyjslib.cmp(self.__getitem__(x), l.__getitem__(x));
					if (pyjslib.bool((ll != 0))) {
						return ll;
					}
				}
			} catch (e) {
				if (e.__name__ != 'StopIteration') {
					throw e;
				}
			}
			return 0;
		}
		, function ( __kwargs, l ) {
			if (typeof l == 'undefined') {
				l=__kwargs.l;
				delete __kwargs.l;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.l != 'undefined') {
				pyjs__exception_func_multiple_values('__cmp__', 'l');
			}
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('__cmp__', i);
				}
			}
			var __r = [l];
			for (var pyjs__va_arg = 2;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		});
		cls_definition.slice = pyjs__bind_method(cls_instance, 'slice', function(lower, upper) {
			if (this.__is_instance__ === true) {
				var self = this;
				if (pyjs_options.arg_count && arguments.length != 2) pyjs__exception_func_param(arguments.callee.__name__, 3, 3, arguments.length+1);
			} else {
				var self = arguments[0];
				lower = arguments[1];
				upper = arguments[2];
				if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
				if (pyjs_options.arg_count && arguments.length != 3) pyjs__exception_func_param(arguments.callee.__name__, 3, 3, arguments.length);
			}
			if (pyjs_options.arg_instance_type) {
				if (self.prototype.__md5__ !== '456cea168118485433b934b8ef4974b4') {
					if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
						pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					}
				}
			}

        if (upper==null) return pyjslib.List(this.l.slice(lower));
        return pyjslib.List(this.l.slice(lower, upper));
        
		}
		, function ( __kwargs, lower, upper ) {
			if (typeof lower == 'undefined') {
				lower=__kwargs.lower;
				delete __kwargs.lower;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.lower != 'undefined') {
				pyjs__exception_func_multiple_values('slice', 'lower');
			}
			if (typeof upper == 'undefined') {
				upper=__kwargs.upper;
				delete __kwargs.upper;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.upper != 'undefined') {
				pyjs__exception_func_multiple_values('slice', 'upper');
			}
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('slice', i);
				}
			}
			var __r = [lower, upper];
			for (var pyjs__va_arg = 3;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		});
		cls_definition.__getitem__ = pyjs__bind_method(cls_instance, '__getitem__', function(index) {
			if (this.__is_instance__ === true) {
				var self = this;
				if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 2, 2, arguments.length+1);
			} else {
				var self = arguments[0];
				index = arguments[1];
				if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
				if (pyjs_options.arg_count && arguments.length != 2) pyjs__exception_func_param(arguments.callee.__name__, 2, 2, arguments.length);
			}
			if (pyjs_options.arg_instance_type) {
				if (self.prototype.__md5__ !== '456cea168118485433b934b8ef4974b4') {
					if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
						pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					}
				}
			}

        if (index<0) index = this.l.length + index;
        return this.l[index];
        
		}
		, function ( __kwargs, index ) {
			if (typeof index == 'undefined') {
				index=__kwargs.index;
				delete __kwargs.index;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.index != 'undefined') {
				pyjs__exception_func_multiple_values('__getitem__', 'index');
			}
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('__getitem__', i);
				}
			}
			var __r = [index];
			for (var pyjs__va_arg = 2;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		});
		cls_definition.__setitem__ = pyjs__bind_method(cls_instance, '__setitem__', function(index, value) {
			if (this.__is_instance__ === true) {
				var self = this;
				if (pyjs_options.arg_count && arguments.length != 2) pyjs__exception_func_param(arguments.callee.__name__, 3, 3, arguments.length+1);
			} else {
				var self = arguments[0];
				index = arguments[1];
				value = arguments[2];
				if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
				if (pyjs_options.arg_count && arguments.length != 3) pyjs__exception_func_param(arguments.callee.__name__, 3, 3, arguments.length);
			}
			if (pyjs_options.arg_instance_type) {
				if (self.prototype.__md5__ !== '456cea168118485433b934b8ef4974b4') {
					if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
						pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					}
				}
			}
    this.l[index]=value;
		}
		, function ( __kwargs, index, value ) {
			if (typeof index == 'undefined') {
				index=__kwargs.index;
				delete __kwargs.index;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.index != 'undefined') {
				pyjs__exception_func_multiple_values('__setitem__', 'index');
			}
			if (typeof value == 'undefined') {
				value=__kwargs.value;
				delete __kwargs.value;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.value != 'undefined') {
				pyjs__exception_func_multiple_values('__setitem__', 'value');
			}
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('__setitem__', i);
				}
			}
			var __r = [index, value];
			for (var pyjs__va_arg = 3;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		});
		cls_definition.__delitem__ = pyjs__bind_method(cls_instance, '__delitem__', function(index) {
			if (this.__is_instance__ === true) {
				var self = this;
				if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 2, 2, arguments.length+1);
			} else {
				var self = arguments[0];
				index = arguments[1];
				if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
				if (pyjs_options.arg_count && arguments.length != 2) pyjs__exception_func_param(arguments.callee.__name__, 2, 2, arguments.length);
			}
			if (pyjs_options.arg_instance_type) {
				if (self.prototype.__md5__ !== '456cea168118485433b934b8ef4974b4') {
					if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
						pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					}
				}
			}
    this.l.splice(index, 1);
		}
		, function ( __kwargs, index ) {
			if (typeof index == 'undefined') {
				index=__kwargs.index;
				delete __kwargs.index;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.index != 'undefined') {
				pyjs__exception_func_multiple_values('__delitem__', 'index');
			}
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('__delitem__', i);
				}
			}
			var __r = [index];
			for (var pyjs__va_arg = 2;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		});
		cls_definition.__len__ = pyjs__bind_method(cls_instance, '__len__', function() {
			if (this.__is_instance__ === true) {
				var self = this;
				if (pyjs_options.arg_count && arguments.length != 0) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length+1);
			} else {
				var self = arguments[0];
				if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
				if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length);
			}
			if (pyjs_options.arg_instance_type) {
				if (self.prototype.__md5__ !== '456cea168118485433b934b8ef4974b4') {
					if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
						pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					}
				}
			}
    return this.l.length;
		}
		, function ( __kwargs ) {
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('__len__', i);
				}
			}
			var __r = [];
			for (var pyjs__va_arg = 1;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		});
		cls_definition.__contains__ = pyjs__bind_method(cls_instance, '__contains__', function(value) {
			if (this.__is_instance__ === true) {
				var self = this;
				if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 2, 2, arguments.length+1);
			} else {
				var self = arguments[0];
				value = arguments[1];
				if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
				if (pyjs_options.arg_count && arguments.length != 2) pyjs__exception_func_param(arguments.callee.__name__, 2, 2, arguments.length);
			}
			if (pyjs_options.arg_instance_type) {
				if (self.prototype.__md5__ !== '456cea168118485433b934b8ef4974b4') {
					if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
						pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					}
				}
			}
			return (pyjslib.cmp(self.index(value), 0) != -1);
		}
		, function ( __kwargs, value ) {
			if (typeof value == 'undefined') {
				value=__kwargs.value;
				delete __kwargs.value;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.value != 'undefined') {
				pyjs__exception_func_multiple_values('__contains__', 'value');
			}
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('__contains__', i);
				}
			}
			var __r = [value];
			for (var pyjs__va_arg = 2;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		});
		cls_definition.__iter__ = pyjs__bind_method(cls_instance, '__iter__', function() {
			if (this.__is_instance__ === true) {
				var self = this;
				if (pyjs_options.arg_count && arguments.length != 0) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length+1);
			} else {
				var self = arguments[0];
				if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
				if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length);
			}
			if (pyjs_options.arg_instance_type) {
				if (self.prototype.__md5__ !== '456cea168118485433b934b8ef4974b4') {
					if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
						pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					}
				}
			}

        var i = 0;
        var l = this.l;
        return {
            'next': function() {
                if (i >= l.length) {
                    throw pyjslib.StopIteration;
                }
                return l[i++];
            },
            '__iter__': function() {
                return this;
            }
        };
        
		}
		, function ( __kwargs ) {
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('__iter__', i);
				}
			}
			var __r = [];
			for (var pyjs__va_arg = 1;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		});
		cls_definition.reverse = pyjs__bind_method(cls_instance, 'reverse', function() {
			if (this.__is_instance__ === true) {
				var self = this;
				if (pyjs_options.arg_count && arguments.length != 0) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length+1);
			} else {
				var self = arguments[0];
				if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
				if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length);
			}
			if (pyjs_options.arg_instance_type) {
				if (self.prototype.__md5__ !== '456cea168118485433b934b8ef4974b4') {
					if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
						pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					}
				}
			}
    this.l.reverse();
		}
		, function ( __kwargs ) {
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('reverse', i);
				}
			}
			var __r = [];
			for (var pyjs__va_arg = 1;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		});
		cls_definition.sort = pyjs__bind_method(cls_instance, 'sort', function(compareFunc, keyFunc, reverse) {
			if (this.__is_instance__ === true) {
				var self = this;
				if (pyjs_options.arg_count && (arguments.length < 0 || arguments.length > 3)) pyjs__exception_func_param(arguments.callee.__name__, 1, 4, arguments.length+1);
			} else {
				var self = arguments[0];
				compareFunc = arguments[1];
				keyFunc = arguments[2];
				reverse = arguments[3];
				if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
				if (pyjs_options.arg_count && (arguments.length < 1 || arguments.length > 4)) pyjs__exception_func_param(arguments.callee.__name__, 1, 4, arguments.length);
			}
			if (pyjs_options.arg_instance_type) {
				if (self.prototype.__md5__ !== '456cea168118485433b934b8ef4974b4') {
					if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
						pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					}
				}
			}
			if (typeof compareFunc == 'undefined') compareFunc=null;
			if (typeof keyFunc == 'undefined') keyFunc=null;
			if (typeof reverse == 'undefined') reverse=false;
			track={module:pyjslib, lineno:711};trackstack.push(track);
			track.module='pyjslib';
			track.lineno=711;
			track.lineno=712;
			if (pyjslib.bool(!(compareFunc))) {
				track.lineno=713;
				track.lineno=714;
				compareFunc = pyjslib.cmp;
			}
			track.lineno=715;
			if (pyjslib.bool((keyFunc) && (reverse))) {
				track.lineno=716;
				thisSort1 = function(a, b) {
					if (pyjs_options.arg_count && arguments.length != 2) pyjs__exception_func_param(arguments.callee.__name__, 2, 2, arguments.length);
					track={module:'pyjslib',lineno:716};trackstack.push(track);
					track.module='pyjslib';
					track.lineno=716;
					track.lineno=717;
					track.lineno=717;
					var pyjs__ret = -compareFunc(keyFunc(a), keyFunc(b));
					trackstack.pop();track=trackstack.pop();trackstack.push(track);
					return pyjs__ret;
				};
				thisSort1.__name__ = 'thisSort1';

				thisSort1.parse_kwargs = function ( __kwargs, a, b ) {
					if (typeof a == 'undefined') {
						a=__kwargs.a;
						delete __kwargs.a;
					} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.a != 'undefined') {
						pyjs__exception_func_multiple_values('thisSort1', 'a');
					}
					if (typeof b == 'undefined') {
						b=__kwargs.b;
						delete __kwargs.b;
					} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.b != 'undefined') {
						pyjs__exception_func_multiple_values('thisSort1', 'b');
					}
					if (pyjs_options.arg_kwarg_unexpected_keyword) {
						for (var i in __kwargs) {
							pyjs__exception_func_unexpected_keyword('thisSort1', i);
						}
					}
					var __r = [a, b];
					for (var pyjs__va_arg = 3;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
						__r.push(arguments[pyjs__va_arg]);
					}

					return __r;
				};
				track.lineno=718;
				self.l.sort(thisSort1);
			}
			else if (pyjslib.bool(keyFunc)) {
				track.lineno=720;
				thisSort2 = function(a, b) {
					if (pyjs_options.arg_count && arguments.length != 2) pyjs__exception_func_param(arguments.callee.__name__, 2, 2, arguments.length);
					track={module:'pyjslib',lineno:720};trackstack.push(track);
					track.module='pyjslib';
					track.lineno=720;
					track.lineno=721;
					track.lineno=721;
					var pyjs__ret = compareFunc(keyFunc(a), keyFunc(b));
					trackstack.pop();track=trackstack.pop();trackstack.push(track);
					return pyjs__ret;
				};
				thisSort2.__name__ = 'thisSort2';

				thisSort2.parse_kwargs = function ( __kwargs, a, b ) {
					if (typeof a == 'undefined') {
						a=__kwargs.a;
						delete __kwargs.a;
					} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.a != 'undefined') {
						pyjs__exception_func_multiple_values('thisSort2', 'a');
					}
					if (typeof b == 'undefined') {
						b=__kwargs.b;
						delete __kwargs.b;
					} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.b != 'undefined') {
						pyjs__exception_func_multiple_values('thisSort2', 'b');
					}
					if (pyjs_options.arg_kwarg_unexpected_keyword) {
						for (var i in __kwargs) {
							pyjs__exception_func_unexpected_keyword('thisSort2', i);
						}
					}
					var __r = [a, b];
					for (var pyjs__va_arg = 3;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
						__r.push(arguments[pyjs__va_arg]);
					}

					return __r;
				};
				track.lineno=722;
				self.l.sort(thisSort2);
			}
			else if (pyjslib.bool(reverse)) {
				track.lineno=724;
				thisSort3 = function(a, b) {
					if (pyjs_options.arg_count && arguments.length != 2) pyjs__exception_func_param(arguments.callee.__name__, 2, 2, arguments.length);
					track={module:'pyjslib',lineno:724};trackstack.push(track);
					track.module='pyjslib';
					track.lineno=724;
					track.lineno=725;
					track.lineno=725;
					var pyjs__ret = -compareFunc(a, b);
					trackstack.pop();track=trackstack.pop();trackstack.push(track);
					return pyjs__ret;
				};
				thisSort3.__name__ = 'thisSort3';

				thisSort3.parse_kwargs = function ( __kwargs, a, b ) {
					if (typeof a == 'undefined') {
						a=__kwargs.a;
						delete __kwargs.a;
					} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.a != 'undefined') {
						pyjs__exception_func_multiple_values('thisSort3', 'a');
					}
					if (typeof b == 'undefined') {
						b=__kwargs.b;
						delete __kwargs.b;
					} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.b != 'undefined') {
						pyjs__exception_func_multiple_values('thisSort3', 'b');
					}
					if (pyjs_options.arg_kwarg_unexpected_keyword) {
						for (var i in __kwargs) {
							pyjs__exception_func_unexpected_keyword('thisSort3', i);
						}
					}
					var __r = [a, b];
					for (var pyjs__va_arg = 3;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
						__r.push(arguments[pyjs__va_arg]);
					}

					return __r;
				};
				track.lineno=726;
				self.l.sort(thisSort3);
			}
			else {
				track.lineno=728;
				self.l.sort(compareFunc);
			}
			trackstack.pop();track=trackstack.pop();trackstack.push(track);
			return null;
		}
		, function ( __kwargs, compareFunc, keyFunc, reverse ) {
			if (typeof compareFunc == 'undefined') {
				compareFunc=__kwargs.compareFunc;
				delete __kwargs.compareFunc;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.compareFunc != 'undefined') {
				pyjs__exception_func_multiple_values('sort', 'compareFunc');
			}
			if (typeof keyFunc == 'undefined') {
				keyFunc=__kwargs.keyFunc;
				delete __kwargs.keyFunc;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.keyFunc != 'undefined') {
				pyjs__exception_func_multiple_values('sort', 'keyFunc');
			}
			if (typeof reverse == 'undefined') {
				reverse=__kwargs.reverse;
				delete __kwargs.reverse;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.reverse != 'undefined') {
				pyjs__exception_func_multiple_values('sort', 'reverse');
			}
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('sort', i);
				}
			}
			var __r = [compareFunc, keyFunc, reverse];
			for (var pyjs__va_arg = 4;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		});
		cls_definition.getArray = pyjs__bind_method(cls_instance, 'getArray', function() {
			if (this.__is_instance__ === true) {
				var self = this;
				if (pyjs_options.arg_count && arguments.length != 0) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length+1);
			} else {
				var self = arguments[0];
				if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
				if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length);
			}
			if (pyjs_options.arg_instance_type) {
				if (self.prototype.__md5__ !== '456cea168118485433b934b8ef4974b4') {
					if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
						pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					}
				}
			}
			return (self.l===undefined?(function(){throw new TypeError('self.l is undefined')})():(typeof self.l == 'function' && self.__is_instance__?pyjslib.getattr(self, 'l'):self.l));
		}
		, function ( __kwargs ) {
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('getArray', i);
				}
			}
			var __r = [];
			for (var pyjs__va_arg = 1;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		});
		cls_definition.__str__ = pyjs__bind_method(cls_instance, '__str__', function() {
			if (this.__is_instance__ === true) {
				var self = this;
				if (pyjs_options.arg_count && arguments.length != 0) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length+1);
			} else {
				var self = arguments[0];
				if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
				if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length);
			}
			if (pyjs_options.arg_instance_type) {
				if (self.prototype.__md5__ !== '456cea168118485433b934b8ef4974b4') {
					if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
						pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					}
				}
			}
			return self.__repr__();
		}
		, function ( __kwargs ) {
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('__str__', i);
				}
			}
			var __r = [];
			for (var pyjs__va_arg = 1;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		});
		cls_definition.toString = pyjs__bind_method(cls_instance, 'toString', function() {
			if (this.__is_instance__ === true) {
				var self = this;
				if (pyjs_options.arg_count && arguments.length != 0) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length+1);
			} else {
				var self = arguments[0];
				if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
				if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length);
			}
			if (pyjs_options.arg_instance_type) {
				if (self.prototype.__md5__ !== '456cea168118485433b934b8ef4974b4') {
					if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
						pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					}
				}
			}
			return self.__repr__();
		}
		, function ( __kwargs ) {
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('toString', i);
				}
			}
			var __r = [];
			for (var pyjs__va_arg = 1;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		});
		cls_definition.__repr__ = pyjs__bind_method(cls_instance, '__repr__', function() {
			if (this.__is_instance__ === true) {
				var self = this;
				if (pyjs_options.arg_count && arguments.length != 0) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length+1);
			} else {
				var self = arguments[0];
				if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
				if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length);
			}
			if (pyjs_options.arg_instance_type) {
				if (self.prototype.__md5__ !== '456cea168118485433b934b8ef4974b4') {
					if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
						pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					}
				}
			}

        var s = "[";
        for (var i=0; i < self.l.length; i++) {
            s += pyjslib.repr(self.l[i]);
            if (i < self.l.length - 1)
                s += ", ";
        };
        s += "]"
        return s;
        
		}
		, function ( __kwargs ) {
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('__repr__', i);
				}
			}
			var __r = [];
			for (var pyjs__va_arg = 1;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		});
		return pyjs__class_function(cls_instance, cls_definition, 
		                            new Array(pyjslib.object));
	})();
	track.lineno=761;
	pyjslib.list = pyjslib.List;
	track.lineno=763;
	pyjslib.Tuple = (function(){
		var cls_instance = pyjs__class_instance('Tuple');
		var cls_definition = new Object();
		cls_definition.__md5__ = 'f9ccde39f155958204612cb792195f02';
		cls_definition.__init__ = pyjs__bind_method(cls_instance, '__init__', function(data) {
			if (this.__is_instance__ === true) {
				var self = this;
				if (pyjs_options.arg_count && (arguments.length < 0 || arguments.length > 1)) pyjs__exception_func_param(arguments.callee.__name__, 1, 2, arguments.length+1);
			} else {
				var self = arguments[0];
				data = arguments[1];
				if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
				if (pyjs_options.arg_count && (arguments.length < 1 || arguments.length > 2)) pyjs__exception_func_param(arguments.callee.__name__, 1, 2, arguments.length);
			}
			if (pyjs_options.arg_instance_type) {
				if (self.prototype.__md5__ !== 'f9ccde39f155958204612cb792195f02') {
					if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
						pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					}
				}
			}
			if (typeof data == 'undefined') data=null;

        this.l = [];
        this.extend(data);
        
		}
		, function ( __kwargs, data ) {
			if (typeof data == 'undefined') {
				data=__kwargs.data;
				delete __kwargs.data;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.data != 'undefined') {
				pyjs__exception_func_multiple_values('__init__', 'data');
			}
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('__init__', i);
				}
			}
			var __r = [data];
			for (var pyjs__va_arg = 2;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		});
		cls_definition.append = pyjs__bind_method(cls_instance, 'append', function(item) {
			if (this.__is_instance__ === true) {
				var self = this;
				if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 2, 2, arguments.length+1);
			} else {
				var self = arguments[0];
				item = arguments[1];
				if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
				if (pyjs_options.arg_count && arguments.length != 2) pyjs__exception_func_param(arguments.callee.__name__, 2, 2, arguments.length);
			}
			if (pyjs_options.arg_instance_type) {
				if (self.prototype.__md5__ !== 'f9ccde39f155958204612cb792195f02') {
					if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
						pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					}
				}
			}
    this.l[this.l.length] = item;
		}
		, function ( __kwargs, item ) {
			if (typeof item == 'undefined') {
				item=__kwargs.item;
				delete __kwargs.item;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.item != 'undefined') {
				pyjs__exception_func_multiple_values('append', 'item');
			}
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('append', i);
				}
			}
			var __r = [item];
			for (var pyjs__va_arg = 2;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		});
		cls_definition.extend = pyjs__bind_method(cls_instance, 'extend', function(data) {
			if (this.__is_instance__ === true) {
				var self = this;
				if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 2, 2, arguments.length+1);
			} else {
				var self = arguments[0];
				data = arguments[1];
				if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
				if (pyjs_options.arg_count && arguments.length != 2) pyjs__exception_func_param(arguments.callee.__name__, 2, 2, arguments.length);
			}
			if (pyjs_options.arg_instance_type) {
				if (self.prototype.__md5__ !== 'f9ccde39f155958204612cb792195f02') {
					if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
						pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					}
				}
			}

        if (pyjslib.isArray(data)) {
            n = this.l.length;
            for (var i=0; i < data.length; i++) {
                this.l[n+i]=data[i];
                }
            }
        else if (pyjslib.isIteratable(data)) {
            var iter=data.__iter__();
            var i=this.l.length;
            try {
                while (true) {
                    var item=iter.next();
                    this.l[i++]=item;
                    }
                }
            catch (e) {
                if (e.__name__ != 'StopIteration') throw e;
                }
            }
        
		}
		, function ( __kwargs, data ) {
			if (typeof data == 'undefined') {
				data=__kwargs.data;
				delete __kwargs.data;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.data != 'undefined') {
				pyjs__exception_func_multiple_values('extend', 'data');
			}
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('extend', i);
				}
			}
			var __r = [data];
			for (var pyjs__va_arg = 2;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		});
		cls_definition.__hash__ = pyjs__bind_method(cls_instance, '__hash__', function() {
			if (this.__is_instance__ === true) {
				var self = this;
				if (pyjs_options.arg_count && arguments.length != 0) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length+1);
			} else {
				var self = arguments[0];
				if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
				if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length);
			}
			if (pyjs_options.arg_instance_type) {
				if (self.prototype.__md5__ !== 'f9ccde39f155958204612cb792195f02') {
					if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
						pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					}
				}
			}

        var strbuf=[];
        for(var i=0; i<this.l.length; i++){
            strbuf.push(pyjslib.hash(this.l[i]))
        }
        return 'tuple('+strbuf.join(',')+')'
        
		}
		, function ( __kwargs ) {
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('__hash__', i);
				}
			}
			var __r = [];
			for (var pyjs__va_arg = 1;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		});
		cls_definition.remove = pyjs__bind_method(cls_instance, 'remove', function(value) {
			if (this.__is_instance__ === true) {
				var self = this;
				if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 2, 2, arguments.length+1);
			} else {
				var self = arguments[0];
				value = arguments[1];
				if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
				if (pyjs_options.arg_count && arguments.length != 2) pyjs__exception_func_param(arguments.callee.__name__, 2, 2, arguments.length);
			}
			if (pyjs_options.arg_instance_type) {
				if (self.prototype.__md5__ !== 'f9ccde39f155958204612cb792195f02') {
					if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
						pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					}
				}
			}

        var index=this.index(value);
        if (index<0) return false;
        this.l.splice(index, 1);
        return true;
        
		}
		, function ( __kwargs, value ) {
			if (typeof value == 'undefined') {
				value=__kwargs.value;
				delete __kwargs.value;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.value != 'undefined') {
				pyjs__exception_func_multiple_values('remove', 'value');
			}
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('remove', i);
				}
			}
			var __r = [value];
			for (var pyjs__va_arg = 2;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		});
		cls_definition.index = pyjs__bind_method(cls_instance, 'index', function(value, start) {
			if (this.__is_instance__ === true) {
				var self = this;
				if (pyjs_options.arg_count && (arguments.length < 1 || arguments.length > 2)) pyjs__exception_func_param(arguments.callee.__name__, 2, 3, arguments.length+1);
			} else {
				var self = arguments[0];
				value = arguments[1];
				start = arguments[2];
				if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
				if (pyjs_options.arg_count && (arguments.length < 2 || arguments.length > 3)) pyjs__exception_func_param(arguments.callee.__name__, 2, 3, arguments.length);
			}
			if (pyjs_options.arg_instance_type) {
				if (self.prototype.__md5__ !== 'f9ccde39f155958204612cb792195f02') {
					if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
						pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					}
				}
			}
			if (typeof start == 'undefined') start=0;

        var length=this.l.length;
        for (var i=start; i<length; i++) {
            if (this.l[i]==value) {
                return i;
                }
            }
        return -1;
        
		}
		, function ( __kwargs, value, start ) {
			if (typeof value == 'undefined') {
				value=__kwargs.value;
				delete __kwargs.value;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.value != 'undefined') {
				pyjs__exception_func_multiple_values('index', 'value');
			}
			if (typeof start == 'undefined') {
				start=__kwargs.start;
				delete __kwargs.start;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.start != 'undefined') {
				pyjs__exception_func_multiple_values('index', 'start');
			}
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('index', i);
				}
			}
			var __r = [value, start];
			for (var pyjs__va_arg = 3;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		});
		cls_definition.insert = pyjs__bind_method(cls_instance, 'insert', function(index, value) {
			if (this.__is_instance__ === true) {
				var self = this;
				if (pyjs_options.arg_count && arguments.length != 2) pyjs__exception_func_param(arguments.callee.__name__, 3, 3, arguments.length+1);
			} else {
				var self = arguments[0];
				index = arguments[1];
				value = arguments[2];
				if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
				if (pyjs_options.arg_count && arguments.length != 3) pyjs__exception_func_param(arguments.callee.__name__, 3, 3, arguments.length);
			}
			if (pyjs_options.arg_instance_type) {
				if (self.prototype.__md5__ !== 'f9ccde39f155958204612cb792195f02') {
					if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
						pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					}
				}
			}
    var a = this.l; this.l=a.slice(0, index).concat(value, a.slice(index));
		}
		, function ( __kwargs, index, value ) {
			if (typeof index == 'undefined') {
				index=__kwargs.index;
				delete __kwargs.index;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.index != 'undefined') {
				pyjs__exception_func_multiple_values('insert', 'index');
			}
			if (typeof value == 'undefined') {
				value=__kwargs.value;
				delete __kwargs.value;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.value != 'undefined') {
				pyjs__exception_func_multiple_values('insert', 'value');
			}
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('insert', i);
				}
			}
			var __r = [index, value];
			for (var pyjs__va_arg = 3;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		});
		cls_definition.pop = pyjs__bind_method(cls_instance, 'pop', function(index) {
			if (this.__is_instance__ === true) {
				var self = this;
				if (pyjs_options.arg_count && (arguments.length < 0 || arguments.length > 1)) pyjs__exception_func_param(arguments.callee.__name__, 1, 2, arguments.length+1);
			} else {
				var self = arguments[0];
				index = arguments[1];
				if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
				if (pyjs_options.arg_count && (arguments.length < 1 || arguments.length > 2)) pyjs__exception_func_param(arguments.callee.__name__, 1, 2, arguments.length);
			}
			if (pyjs_options.arg_instance_type) {
				if (self.prototype.__md5__ !== 'f9ccde39f155958204612cb792195f02') {
					if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
						pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					}
				}
			}
			if (typeof index == 'undefined') index=-1;

        if (index<0) index = this.l.length + index;
        var a = this.l[index];
        this.l.splice(index, 1);
        return a;
        
		}
		, function ( __kwargs, index ) {
			if (typeof index == 'undefined') {
				index=__kwargs.index;
				delete __kwargs.index;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.index != 'undefined') {
				pyjs__exception_func_multiple_values('pop', 'index');
			}
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('pop', i);
				}
			}
			var __r = [index];
			for (var pyjs__va_arg = 2;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		});
		cls_definition.__cmp__ = pyjs__bind_method(cls_instance, '__cmp__', function(l) {
			if (this.__is_instance__ === true) {
				var self = this;
				if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 2, 2, arguments.length+1);
			} else {
				var self = arguments[0];
				l = arguments[1];
				if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
				if (pyjs_options.arg_count && arguments.length != 2) pyjs__exception_func_param(arguments.callee.__name__, 2, 2, arguments.length);
			}
			if (pyjs_options.arg_instance_type) {
				if (self.prototype.__md5__ !== 'f9ccde39f155958204612cb792195f02') {
					if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
						pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					}
				}
			}
			if (pyjslib.bool(!(pyjslib.isinstance(l, pyjslib.Tuple)))) {
				return 1;
			}
			var ll =  ( pyjslib.len(self) - pyjslib.len(l) ) ;
			if (pyjslib.bool((ll != 0))) {
				return ll;
			}
			var __x = pyjslib.range(pyjslib.len(l)).__iter__();
			try {
				while (true) {
					var x = __x.next();
					
					ll = pyjslib.cmp(self.__getitem__(x), l.__getitem__(x));
					if (pyjslib.bool((ll != 0))) {
						return ll;
					}
				}
			} catch (e) {
				if (e.__name__ != 'StopIteration') {
					throw e;
				}
			}
			return 0;
		}
		, function ( __kwargs, l ) {
			if (typeof l == 'undefined') {
				l=__kwargs.l;
				delete __kwargs.l;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.l != 'undefined') {
				pyjs__exception_func_multiple_values('__cmp__', 'l');
			}
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('__cmp__', i);
				}
			}
			var __r = [l];
			for (var pyjs__va_arg = 2;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		});
		cls_definition.slice = pyjs__bind_method(cls_instance, 'slice', function(lower, upper) {
			if (this.__is_instance__ === true) {
				var self = this;
				if (pyjs_options.arg_count && arguments.length != 2) pyjs__exception_func_param(arguments.callee.__name__, 3, 3, arguments.length+1);
			} else {
				var self = arguments[0];
				lower = arguments[1];
				upper = arguments[2];
				if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
				if (pyjs_options.arg_count && arguments.length != 3) pyjs__exception_func_param(arguments.callee.__name__, 3, 3, arguments.length);
			}
			if (pyjs_options.arg_instance_type) {
				if (self.prototype.__md5__ !== 'f9ccde39f155958204612cb792195f02') {
					if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
						pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					}
				}
			}

        if (upper==null) return pyjslib.Tuple(this.l.slice(lower));
        return pyjslib.Tuple(this.l.slice(lower, upper));
        
		}
		, function ( __kwargs, lower, upper ) {
			if (typeof lower == 'undefined') {
				lower=__kwargs.lower;
				delete __kwargs.lower;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.lower != 'undefined') {
				pyjs__exception_func_multiple_values('slice', 'lower');
			}
			if (typeof upper == 'undefined') {
				upper=__kwargs.upper;
				delete __kwargs.upper;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.upper != 'undefined') {
				pyjs__exception_func_multiple_values('slice', 'upper');
			}
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('slice', i);
				}
			}
			var __r = [lower, upper];
			for (var pyjs__va_arg = 3;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		});
		cls_definition.__getitem__ = pyjs__bind_method(cls_instance, '__getitem__', function(index) {
			if (this.__is_instance__ === true) {
				var self = this;
				if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 2, 2, arguments.length+1);
			} else {
				var self = arguments[0];
				index = arguments[1];
				if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
				if (pyjs_options.arg_count && arguments.length != 2) pyjs__exception_func_param(arguments.callee.__name__, 2, 2, arguments.length);
			}
			if (pyjs_options.arg_instance_type) {
				if (self.prototype.__md5__ !== 'f9ccde39f155958204612cb792195f02') {
					if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
						pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					}
				}
			}

        if (index<0) index = this.l.length + index;
        return this.l[index];
        
		}
		, function ( __kwargs, index ) {
			if (typeof index == 'undefined') {
				index=__kwargs.index;
				delete __kwargs.index;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.index != 'undefined') {
				pyjs__exception_func_multiple_values('__getitem__', 'index');
			}
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('__getitem__', i);
				}
			}
			var __r = [index];
			for (var pyjs__va_arg = 2;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		});
		cls_definition.__setitem__ = pyjs__bind_method(cls_instance, '__setitem__', function(index, value) {
			if (this.__is_instance__ === true) {
				var self = this;
				if (pyjs_options.arg_count && arguments.length != 2) pyjs__exception_func_param(arguments.callee.__name__, 3, 3, arguments.length+1);
			} else {
				var self = arguments[0];
				index = arguments[1];
				value = arguments[2];
				if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
				if (pyjs_options.arg_count && arguments.length != 3) pyjs__exception_func_param(arguments.callee.__name__, 3, 3, arguments.length);
			}
			if (pyjs_options.arg_instance_type) {
				if (self.prototype.__md5__ !== 'f9ccde39f155958204612cb792195f02') {
					if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
						pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					}
				}
			}
    this.l[index]=value;
		}
		, function ( __kwargs, index, value ) {
			if (typeof index == 'undefined') {
				index=__kwargs.index;
				delete __kwargs.index;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.index != 'undefined') {
				pyjs__exception_func_multiple_values('__setitem__', 'index');
			}
			if (typeof value == 'undefined') {
				value=__kwargs.value;
				delete __kwargs.value;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.value != 'undefined') {
				pyjs__exception_func_multiple_values('__setitem__', 'value');
			}
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('__setitem__', i);
				}
			}
			var __r = [index, value];
			for (var pyjs__va_arg = 3;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		});
		cls_definition.__delitem__ = pyjs__bind_method(cls_instance, '__delitem__', function(index) {
			if (this.__is_instance__ === true) {
				var self = this;
				if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 2, 2, arguments.length+1);
			} else {
				var self = arguments[0];
				index = arguments[1];
				if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
				if (pyjs_options.arg_count && arguments.length != 2) pyjs__exception_func_param(arguments.callee.__name__, 2, 2, arguments.length);
			}
			if (pyjs_options.arg_instance_type) {
				if (self.prototype.__md5__ !== 'f9ccde39f155958204612cb792195f02') {
					if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
						pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					}
				}
			}
    this.l.splice(index, 1);
		}
		, function ( __kwargs, index ) {
			if (typeof index == 'undefined') {
				index=__kwargs.index;
				delete __kwargs.index;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.index != 'undefined') {
				pyjs__exception_func_multiple_values('__delitem__', 'index');
			}
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('__delitem__', i);
				}
			}
			var __r = [index];
			for (var pyjs__va_arg = 2;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		});
		cls_definition.__len__ = pyjs__bind_method(cls_instance, '__len__', function() {
			if (this.__is_instance__ === true) {
				var self = this;
				if (pyjs_options.arg_count && arguments.length != 0) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length+1);
			} else {
				var self = arguments[0];
				if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
				if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length);
			}
			if (pyjs_options.arg_instance_type) {
				if (self.prototype.__md5__ !== 'f9ccde39f155958204612cb792195f02') {
					if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
						pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					}
				}
			}
    return this.l.length;
		}
		, function ( __kwargs ) {
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('__len__', i);
				}
			}
			var __r = [];
			for (var pyjs__va_arg = 1;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		});
		cls_definition.__contains__ = pyjs__bind_method(cls_instance, '__contains__', function(value) {
			if (this.__is_instance__ === true) {
				var self = this;
				if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 2, 2, arguments.length+1);
			} else {
				var self = arguments[0];
				value = arguments[1];
				if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
				if (pyjs_options.arg_count && arguments.length != 2) pyjs__exception_func_param(arguments.callee.__name__, 2, 2, arguments.length);
			}
			if (pyjs_options.arg_instance_type) {
				if (self.prototype.__md5__ !== 'f9ccde39f155958204612cb792195f02') {
					if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
						pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					}
				}
			}
			return (pyjslib.cmp(self.index(value), 0) != -1);
		}
		, function ( __kwargs, value ) {
			if (typeof value == 'undefined') {
				value=__kwargs.value;
				delete __kwargs.value;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.value != 'undefined') {
				pyjs__exception_func_multiple_values('__contains__', 'value');
			}
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('__contains__', i);
				}
			}
			var __r = [value];
			for (var pyjs__va_arg = 2;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		});
		cls_definition.__iter__ = pyjs__bind_method(cls_instance, '__iter__', function() {
			if (this.__is_instance__ === true) {
				var self = this;
				if (pyjs_options.arg_count && arguments.length != 0) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length+1);
			} else {
				var self = arguments[0];
				if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
				if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length);
			}
			if (pyjs_options.arg_instance_type) {
				if (self.prototype.__md5__ !== 'f9ccde39f155958204612cb792195f02') {
					if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
						pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					}
				}
			}

        var i = 0;
        var l = this.l;
        return {
            'next': function() {
                if (i >= l.length) {
                    throw pyjslib.StopIteration;
                }
                return l[i++];
            },
            '__iter__': function() {
                return this;
            }
        };
        
		}
		, function ( __kwargs ) {
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('__iter__', i);
				}
			}
			var __r = [];
			for (var pyjs__va_arg = 1;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		});
		cls_definition.reverse = pyjs__bind_method(cls_instance, 'reverse', function() {
			if (this.__is_instance__ === true) {
				var self = this;
				if (pyjs_options.arg_count && arguments.length != 0) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length+1);
			} else {
				var self = arguments[0];
				if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
				if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length);
			}
			if (pyjs_options.arg_instance_type) {
				if (self.prototype.__md5__ !== 'f9ccde39f155958204612cb792195f02') {
					if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
						pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					}
				}
			}
    this.l.reverse();
		}
		, function ( __kwargs ) {
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('reverse', i);
				}
			}
			var __r = [];
			for (var pyjs__va_arg = 1;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		});
		cls_definition.sort = pyjs__bind_method(cls_instance, 'sort', function(compareFunc, keyFunc, reverse) {
			if (this.__is_instance__ === true) {
				var self = this;
				if (pyjs_options.arg_count && (arguments.length < 0 || arguments.length > 3)) pyjs__exception_func_param(arguments.callee.__name__, 1, 4, arguments.length+1);
			} else {
				var self = arguments[0];
				compareFunc = arguments[1];
				keyFunc = arguments[2];
				reverse = arguments[3];
				if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
				if (pyjs_options.arg_count && (arguments.length < 1 || arguments.length > 4)) pyjs__exception_func_param(arguments.callee.__name__, 1, 4, arguments.length);
			}
			if (pyjs_options.arg_instance_type) {
				if (self.prototype.__md5__ !== 'f9ccde39f155958204612cb792195f02') {
					if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
						pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					}
				}
			}
			if (typeof compareFunc == 'undefined') compareFunc=null;
			if (typeof keyFunc == 'undefined') keyFunc=null;
			if (typeof reverse == 'undefined') reverse=false;
			track={module:pyjslib, lineno:908};trackstack.push(track);
			track.module='pyjslib';
			track.lineno=908;
			track.lineno=909;
			if (pyjslib.bool(!(compareFunc))) {
				track.lineno=910;
				track.lineno=911;
				compareFunc = pyjslib.cmp;
			}
			track.lineno=912;
			if (pyjslib.bool((keyFunc) && (reverse))) {
				track.lineno=913;
				thisSort1 = function(a, b) {
					if (pyjs_options.arg_count && arguments.length != 2) pyjs__exception_func_param(arguments.callee.__name__, 2, 2, arguments.length);
					track={module:'pyjslib',lineno:913};trackstack.push(track);
					track.module='pyjslib';
					track.lineno=913;
					track.lineno=914;
					track.lineno=914;
					var pyjs__ret = -compareFunc(keyFunc(a), keyFunc(b));
					trackstack.pop();track=trackstack.pop();trackstack.push(track);
					return pyjs__ret;
				};
				thisSort1.__name__ = 'thisSort1';

				thisSort1.parse_kwargs = function ( __kwargs, a, b ) {
					if (typeof a == 'undefined') {
						a=__kwargs.a;
						delete __kwargs.a;
					} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.a != 'undefined') {
						pyjs__exception_func_multiple_values('thisSort1', 'a');
					}
					if (typeof b == 'undefined') {
						b=__kwargs.b;
						delete __kwargs.b;
					} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.b != 'undefined') {
						pyjs__exception_func_multiple_values('thisSort1', 'b');
					}
					if (pyjs_options.arg_kwarg_unexpected_keyword) {
						for (var i in __kwargs) {
							pyjs__exception_func_unexpected_keyword('thisSort1', i);
						}
					}
					var __r = [a, b];
					for (var pyjs__va_arg = 3;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
						__r.push(arguments[pyjs__va_arg]);
					}

					return __r;
				};
				track.lineno=915;
				self.l.sort(thisSort1);
			}
			else if (pyjslib.bool(keyFunc)) {
				track.lineno=917;
				thisSort2 = function(a, b) {
					if (pyjs_options.arg_count && arguments.length != 2) pyjs__exception_func_param(arguments.callee.__name__, 2, 2, arguments.length);
					track={module:'pyjslib',lineno:917};trackstack.push(track);
					track.module='pyjslib';
					track.lineno=917;
					track.lineno=918;
					track.lineno=918;
					var pyjs__ret = compareFunc(keyFunc(a), keyFunc(b));
					trackstack.pop();track=trackstack.pop();trackstack.push(track);
					return pyjs__ret;
				};
				thisSort2.__name__ = 'thisSort2';

				thisSort2.parse_kwargs = function ( __kwargs, a, b ) {
					if (typeof a == 'undefined') {
						a=__kwargs.a;
						delete __kwargs.a;
					} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.a != 'undefined') {
						pyjs__exception_func_multiple_values('thisSort2', 'a');
					}
					if (typeof b == 'undefined') {
						b=__kwargs.b;
						delete __kwargs.b;
					} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.b != 'undefined') {
						pyjs__exception_func_multiple_values('thisSort2', 'b');
					}
					if (pyjs_options.arg_kwarg_unexpected_keyword) {
						for (var i in __kwargs) {
							pyjs__exception_func_unexpected_keyword('thisSort2', i);
						}
					}
					var __r = [a, b];
					for (var pyjs__va_arg = 3;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
						__r.push(arguments[pyjs__va_arg]);
					}

					return __r;
				};
				track.lineno=919;
				self.l.sort(thisSort2);
			}
			else if (pyjslib.bool(reverse)) {
				track.lineno=921;
				thisSort3 = function(a, b) {
					if (pyjs_options.arg_count && arguments.length != 2) pyjs__exception_func_param(arguments.callee.__name__, 2, 2, arguments.length);
					track={module:'pyjslib',lineno:921};trackstack.push(track);
					track.module='pyjslib';
					track.lineno=921;
					track.lineno=922;
					track.lineno=922;
					var pyjs__ret = -compareFunc(a, b);
					trackstack.pop();track=trackstack.pop();trackstack.push(track);
					return pyjs__ret;
				};
				thisSort3.__name__ = 'thisSort3';

				thisSort3.parse_kwargs = function ( __kwargs, a, b ) {
					if (typeof a == 'undefined') {
						a=__kwargs.a;
						delete __kwargs.a;
					} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.a != 'undefined') {
						pyjs__exception_func_multiple_values('thisSort3', 'a');
					}
					if (typeof b == 'undefined') {
						b=__kwargs.b;
						delete __kwargs.b;
					} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.b != 'undefined') {
						pyjs__exception_func_multiple_values('thisSort3', 'b');
					}
					if (pyjs_options.arg_kwarg_unexpected_keyword) {
						for (var i in __kwargs) {
							pyjs__exception_func_unexpected_keyword('thisSort3', i);
						}
					}
					var __r = [a, b];
					for (var pyjs__va_arg = 3;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
						__r.push(arguments[pyjs__va_arg]);
					}

					return __r;
				};
				track.lineno=923;
				self.l.sort(thisSort3);
			}
			else {
				track.lineno=925;
				self.l.sort(compareFunc);
			}
			trackstack.pop();track=trackstack.pop();trackstack.push(track);
			return null;
		}
		, function ( __kwargs, compareFunc, keyFunc, reverse ) {
			if (typeof compareFunc == 'undefined') {
				compareFunc=__kwargs.compareFunc;
				delete __kwargs.compareFunc;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.compareFunc != 'undefined') {
				pyjs__exception_func_multiple_values('sort', 'compareFunc');
			}
			if (typeof keyFunc == 'undefined') {
				keyFunc=__kwargs.keyFunc;
				delete __kwargs.keyFunc;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.keyFunc != 'undefined') {
				pyjs__exception_func_multiple_values('sort', 'keyFunc');
			}
			if (typeof reverse == 'undefined') {
				reverse=__kwargs.reverse;
				delete __kwargs.reverse;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.reverse != 'undefined') {
				pyjs__exception_func_multiple_values('sort', 'reverse');
			}
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('sort', i);
				}
			}
			var __r = [compareFunc, keyFunc, reverse];
			for (var pyjs__va_arg = 4;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		});
		cls_definition.getArray = pyjs__bind_method(cls_instance, 'getArray', function() {
			if (this.__is_instance__ === true) {
				var self = this;
				if (pyjs_options.arg_count && arguments.length != 0) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length+1);
			} else {
				var self = arguments[0];
				if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
				if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length);
			}
			if (pyjs_options.arg_instance_type) {
				if (self.prototype.__md5__ !== 'f9ccde39f155958204612cb792195f02') {
					if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
						pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					}
				}
			}
			return (self.l===undefined?(function(){throw new TypeError('self.l is undefined')})():(typeof self.l == 'function' && self.__is_instance__?pyjslib.getattr(self, 'l'):self.l));
		}
		, function ( __kwargs ) {
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('getArray', i);
				}
			}
			var __r = [];
			for (var pyjs__va_arg = 1;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		});
		cls_definition.__str__ = pyjs__bind_method(cls_instance, '__str__', function() {
			if (this.__is_instance__ === true) {
				var self = this;
				if (pyjs_options.arg_count && arguments.length != 0) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length+1);
			} else {
				var self = arguments[0];
				if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
				if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length);
			}
			if (pyjs_options.arg_instance_type) {
				if (self.prototype.__md5__ !== 'f9ccde39f155958204612cb792195f02') {
					if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
						pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					}
				}
			}
			return self.__repr__();
		}
		, function ( __kwargs ) {
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('__str__', i);
				}
			}
			var __r = [];
			for (var pyjs__va_arg = 1;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		});
		cls_definition.toString = pyjs__bind_method(cls_instance, 'toString', function() {
			if (this.__is_instance__ === true) {
				var self = this;
				if (pyjs_options.arg_count && arguments.length != 0) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length+1);
			} else {
				var self = arguments[0];
				if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
				if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length);
			}
			if (pyjs_options.arg_instance_type) {
				if (self.prototype.__md5__ !== 'f9ccde39f155958204612cb792195f02') {
					if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
						pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					}
				}
			}
			return self.__repr__();
		}
		, function ( __kwargs ) {
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('toString', i);
				}
			}
			var __r = [];
			for (var pyjs__va_arg = 1;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		});
		cls_definition.__repr__ = pyjs__bind_method(cls_instance, '__repr__', function() {
			if (this.__is_instance__ === true) {
				var self = this;
				if (pyjs_options.arg_count && arguments.length != 0) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length+1);
			} else {
				var self = arguments[0];
				if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
				if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length);
			}
			if (pyjs_options.arg_instance_type) {
				if (self.prototype.__md5__ !== 'f9ccde39f155958204612cb792195f02') {
					if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
						pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					}
				}
			}

        var s = "(";
        for (var i=0; i < self.l.length; i++) {
            s += pyjslib.repr(self.l[i]);
            if (i < self.l.length - 1)
                s += ", ";
        };
        if (self.l.length == 1)
            s += ",";
        s += ")"
        return s;
        
		}
		, function ( __kwargs ) {
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('__repr__', i);
				}
			}
			var __r = [];
			for (var pyjs__va_arg = 1;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		});
		return pyjs__class_function(cls_instance, cls_definition, 
		                            new Array(pyjslib.object));
	})();
	track.lineno=962;
	pyjslib.tuple = pyjslib.Tuple;
	track.lineno=965;
	pyjslib.Dict = (function(){
		var cls_instance = pyjs__class_instance('Dict');
		var cls_definition = new Object();
		cls_definition.__md5__ = '992544cebd6c82ba4f4c477a27ae5805';
		cls_definition.__init__ = pyjs__bind_method(cls_instance, '__init__', function(data) {
			if (this.__is_instance__ === true) {
				var self = this;
				if (pyjs_options.arg_count && (arguments.length < 0 || arguments.length > 1)) pyjs__exception_func_param(arguments.callee.__name__, 1, 2, arguments.length+1);
			} else {
				var self = arguments[0];
				data = arguments[1];
				if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
				if (pyjs_options.arg_count && (arguments.length < 1 || arguments.length > 2)) pyjs__exception_func_param(arguments.callee.__name__, 1, 2, arguments.length);
			}
			if (pyjs_options.arg_instance_type) {
				if (self.prototype.__md5__ !== '992544cebd6c82ba4f4c477a27ae5805') {
					if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
						pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					}
				}
			}
			if (typeof data == 'undefined') data=null;

        this.d = {};

        if (pyjslib.isArray(data)) {
            for (var i in data) {
                var item=data[i];
                this.__setitem__(item[0], item[1]);
                //var sKey=pyjslib.hash(item[0]);
                //this.d[sKey]=item[1];
                }
            }
        else if (pyjslib.isIteratable(data)) {
            var iter=data.__iter__();
            try {
                while (true) {
                    var item=iter.next();
                    this.__setitem__(item.__getitem__(0), item.__getitem__(1));
                    }
                }
            catch (e) {
                if (e.__name__ != 'StopIteration') throw e;
                }
            }
        else if (pyjslib.isObject(data)) {
            for (var key in data) {
                this.__setitem__(key, data[key]);
                }
            }
        
		}
		, function ( __kwargs, data ) {
			if (typeof data == 'undefined') {
				data=__kwargs.data;
				delete __kwargs.data;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.data != 'undefined') {
				pyjs__exception_func_multiple_values('__init__', 'data');
			}
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('__init__', i);
				}
			}
			var __r = [data];
			for (var pyjs__va_arg = 2;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		});
		cls_definition.__setitem__ = pyjs__bind_method(cls_instance, '__setitem__', function(key, value) {
			if (this.__is_instance__ === true) {
				var self = this;
				if (pyjs_options.arg_count && arguments.length != 2) pyjs__exception_func_param(arguments.callee.__name__, 3, 3, arguments.length+1);
			} else {
				var self = arguments[0];
				key = arguments[1];
				value = arguments[2];
				if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
				if (pyjs_options.arg_count && arguments.length != 3) pyjs__exception_func_param(arguments.callee.__name__, 3, 3, arguments.length);
			}
			if (pyjs_options.arg_instance_type) {
				if (self.prototype.__md5__ !== '992544cebd6c82ba4f4c477a27ae5805') {
					if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
						pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					}
				}
			}

        var sKey = pyjslib.hash(key);
        this.d[sKey]=[key, value];
        
		}
		, function ( __kwargs, key, value ) {
			if (typeof key == 'undefined') {
				key=__kwargs.key;
				delete __kwargs.key;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.key != 'undefined') {
				pyjs__exception_func_multiple_values('__setitem__', 'key');
			}
			if (typeof value == 'undefined') {
				value=__kwargs.value;
				delete __kwargs.value;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.value != 'undefined') {
				pyjs__exception_func_multiple_values('__setitem__', 'value');
			}
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('__setitem__', i);
				}
			}
			var __r = [key, value];
			for (var pyjs__va_arg = 3;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		});
		cls_definition.__getitem__ = pyjs__bind_method(cls_instance, '__getitem__', function(key) {
			if (this.__is_instance__ === true) {
				var self = this;
				if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 2, 2, arguments.length+1);
			} else {
				var self = arguments[0];
				key = arguments[1];
				if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
				if (pyjs_options.arg_count && arguments.length != 2) pyjs__exception_func_param(arguments.callee.__name__, 2, 2, arguments.length);
			}
			if (pyjs_options.arg_instance_type) {
				if (self.prototype.__md5__ !== '992544cebd6c82ba4f4c477a27ae5805') {
					if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
						pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					}
				}
			}

        var sKey = pyjslib.hash(key);
        var value=this.d[sKey];
        if (pyjslib.isUndefined(value)){
            throw pyjslib.KeyError(key);
        }
        return value[1];
        
		}
		, function ( __kwargs, key ) {
			if (typeof key == 'undefined') {
				key=__kwargs.key;
				delete __kwargs.key;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.key != 'undefined') {
				pyjs__exception_func_multiple_values('__getitem__', 'key');
			}
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('__getitem__', i);
				}
			}
			var __r = [key];
			for (var pyjs__va_arg = 2;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		});
		cls_definition.__nonzero__ = pyjs__bind_method(cls_instance, '__nonzero__', function() {
			if (this.__is_instance__ === true) {
				var self = this;
				if (pyjs_options.arg_count && arguments.length != 0) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length+1);
			} else {
				var self = arguments[0];
				if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
				if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length);
			}
			if (pyjs_options.arg_instance_type) {
				if (self.prototype.__md5__ !== '992544cebd6c82ba4f4c477a27ae5805') {
					if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
						pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					}
				}
			}

        for (var i in this.d){
            return true;
        }
        return false;
        
		}
		, function ( __kwargs ) {
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('__nonzero__', i);
				}
			}
			var __r = [];
			for (var pyjs__va_arg = 1;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		});
		cls_definition.__len__ = pyjs__bind_method(cls_instance, '__len__', function() {
			if (this.__is_instance__ === true) {
				var self = this;
				if (pyjs_options.arg_count && arguments.length != 0) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length+1);
			} else {
				var self = arguments[0];
				if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
				if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length);
			}
			if (pyjs_options.arg_instance_type) {
				if (self.prototype.__md5__ !== '992544cebd6c82ba4f4c477a27ae5805') {
					if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
						pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					}
				}
			}

        var size=0;
        for (var i in this.d) size++;
        return size;
        
		}
		, function ( __kwargs ) {
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('__len__', i);
				}
			}
			var __r = [];
			for (var pyjs__va_arg = 1;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		});
		cls_definition.has_key = pyjs__bind_method(cls_instance, 'has_key', function(key) {
			if (this.__is_instance__ === true) {
				var self = this;
				if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 2, 2, arguments.length+1);
			} else {
				var self = arguments[0];
				key = arguments[1];
				if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
				if (pyjs_options.arg_count && arguments.length != 2) pyjs__exception_func_param(arguments.callee.__name__, 2, 2, arguments.length);
			}
			if (pyjs_options.arg_instance_type) {
				if (self.prototype.__md5__ !== '992544cebd6c82ba4f4c477a27ae5805') {
					if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
						pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					}
				}
			}
			return self.__contains__(key);
		}
		, function ( __kwargs, key ) {
			if (typeof key == 'undefined') {
				key=__kwargs.key;
				delete __kwargs.key;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.key != 'undefined') {
				pyjs__exception_func_multiple_values('has_key', 'key');
			}
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('has_key', i);
				}
			}
			var __r = [key];
			for (var pyjs__va_arg = 2;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		});
		cls_definition.__delitem__ = pyjs__bind_method(cls_instance, '__delitem__', function(key) {
			if (this.__is_instance__ === true) {
				var self = this;
				if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 2, 2, arguments.length+1);
			} else {
				var self = arguments[0];
				key = arguments[1];
				if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
				if (pyjs_options.arg_count && arguments.length != 2) pyjs__exception_func_param(arguments.callee.__name__, 2, 2, arguments.length);
			}
			if (pyjs_options.arg_instance_type) {
				if (self.prototype.__md5__ !== '992544cebd6c82ba4f4c477a27ae5805') {
					if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
						pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					}
				}
			}

        var sKey = pyjslib.hash(key);
        delete this.d[sKey];
        
		}
		, function ( __kwargs, key ) {
			if (typeof key == 'undefined') {
				key=__kwargs.key;
				delete __kwargs.key;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.key != 'undefined') {
				pyjs__exception_func_multiple_values('__delitem__', 'key');
			}
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('__delitem__', i);
				}
			}
			var __r = [key];
			for (var pyjs__va_arg = 2;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		});
		cls_definition.__contains__ = pyjs__bind_method(cls_instance, '__contains__', function(key) {
			if (this.__is_instance__ === true) {
				var self = this;
				if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 2, 2, arguments.length+1);
			} else {
				var self = arguments[0];
				key = arguments[1];
				if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
				if (pyjs_options.arg_count && arguments.length != 2) pyjs__exception_func_param(arguments.callee.__name__, 2, 2, arguments.length);
			}
			if (pyjs_options.arg_instance_type) {
				if (self.prototype.__md5__ !== '992544cebd6c82ba4f4c477a27ae5805') {
					if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
						pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					}
				}
			}

        var sKey = pyjslib.hash(key);
        return (pyjslib.isUndefined(this.d[sKey])) ? false : true;
        
		}
		, function ( __kwargs, key ) {
			if (typeof key == 'undefined') {
				key=__kwargs.key;
				delete __kwargs.key;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.key != 'undefined') {
				pyjs__exception_func_multiple_values('__contains__', 'key');
			}
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('__contains__', i);
				}
			}
			var __r = [key];
			for (var pyjs__va_arg = 2;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		});
		cls_definition.keys = pyjs__bind_method(cls_instance, 'keys', function() {
			if (this.__is_instance__ === true) {
				var self = this;
				if (pyjs_options.arg_count && arguments.length != 0) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length+1);
			} else {
				var self = arguments[0];
				if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
				if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length);
			}
			if (pyjs_options.arg_instance_type) {
				if (self.prototype.__md5__ !== '992544cebd6c82ba4f4c477a27ae5805') {
					if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
						pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					}
				}
			}

        var keys=new pyjslib.List();
        for (var key in this.d) {
            keys.append(this.d[key][0]);
        }
        return keys;
        
		}
		, function ( __kwargs ) {
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('keys', i);
				}
			}
			var __r = [];
			for (var pyjs__va_arg = 1;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		});
		cls_definition.values = pyjs__bind_method(cls_instance, 'values', function() {
			if (this.__is_instance__ === true) {
				var self = this;
				if (pyjs_options.arg_count && arguments.length != 0) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length+1);
			} else {
				var self = arguments[0];
				if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
				if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length);
			}
			if (pyjs_options.arg_instance_type) {
				if (self.prototype.__md5__ !== '992544cebd6c82ba4f4c477a27ae5805') {
					if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
						pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					}
				}
			}

        var values=new pyjslib.List();
        for (var key in this.d) values.append(this.d[key][1]);
        return values;
        
		}
		, function ( __kwargs ) {
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('values', i);
				}
			}
			var __r = [];
			for (var pyjs__va_arg = 1;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		});
		cls_definition.items = pyjs__bind_method(cls_instance, 'items', function() {
			if (this.__is_instance__ === true) {
				var self = this;
				if (pyjs_options.arg_count && arguments.length != 0) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length+1);
			} else {
				var self = arguments[0];
				if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
				if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length);
			}
			if (pyjs_options.arg_instance_type) {
				if (self.prototype.__md5__ !== '992544cebd6c82ba4f4c477a27ae5805') {
					if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
						pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					}
				}
			}

        var items = new pyjslib.List();
        for (var key in this.d) {
          var kv = this.d[key];
          items.append(new pyjslib.List(kv))
          }
          return items;
        
		}
		, function ( __kwargs ) {
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('items', i);
				}
			}
			var __r = [];
			for (var pyjs__va_arg = 1;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		});
		cls_definition.__iter__ = pyjs__bind_method(cls_instance, '__iter__', function() {
			if (this.__is_instance__ === true) {
				var self = this;
				if (pyjs_options.arg_count && arguments.length != 0) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length+1);
			} else {
				var self = arguments[0];
				if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
				if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length);
			}
			if (pyjs_options.arg_instance_type) {
				if (self.prototype.__md5__ !== '992544cebd6c82ba4f4c477a27ae5805') {
					if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
						pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					}
				}
			}
			return self.keys().__iter__();
		}
		, function ( __kwargs ) {
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('__iter__', i);
				}
			}
			var __r = [];
			for (var pyjs__va_arg = 1;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		});
		cls_definition.iterkeys = pyjs__bind_method(cls_instance, 'iterkeys', function() {
			if (this.__is_instance__ === true) {
				var self = this;
				if (pyjs_options.arg_count && arguments.length != 0) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length+1);
			} else {
				var self = arguments[0];
				if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
				if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length);
			}
			if (pyjs_options.arg_instance_type) {
				if (self.prototype.__md5__ !== '992544cebd6c82ba4f4c477a27ae5805') {
					if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
						pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					}
				}
			}
			return self.__iter__();
		}
		, function ( __kwargs ) {
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('iterkeys', i);
				}
			}
			var __r = [];
			for (var pyjs__va_arg = 1;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		});
		cls_definition.itervalues = pyjs__bind_method(cls_instance, 'itervalues', function() {
			if (this.__is_instance__ === true) {
				var self = this;
				if (pyjs_options.arg_count && arguments.length != 0) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length+1);
			} else {
				var self = arguments[0];
				if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
				if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length);
			}
			if (pyjs_options.arg_instance_type) {
				if (self.prototype.__md5__ !== '992544cebd6c82ba4f4c477a27ae5805') {
					if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
						pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					}
				}
			}
			return self.values().__iter__();
			return null;
		}
		, function ( __kwargs ) {
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('itervalues', i);
				}
			}
			var __r = [];
			for (var pyjs__va_arg = 1;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		});
		cls_definition.iteritems = pyjs__bind_method(cls_instance, 'iteritems', function() {
			if (this.__is_instance__ === true) {
				var self = this;
				if (pyjs_options.arg_count && arguments.length != 0) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length+1);
			} else {
				var self = arguments[0];
				if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
				if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length);
			}
			if (pyjs_options.arg_instance_type) {
				if (self.prototype.__md5__ !== '992544cebd6c82ba4f4c477a27ae5805') {
					if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
						pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					}
				}
			}
			return self.items().__iter__();
			return null;
		}
		, function ( __kwargs ) {
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('iteritems', i);
				}
			}
			var __r = [];
			for (var pyjs__va_arg = 1;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		});
		cls_definition.setdefault = pyjs__bind_method(cls_instance, 'setdefault', function(key, default_value) {
			if (this.__is_instance__ === true) {
				var self = this;
				if (pyjs_options.arg_count && arguments.length != 2) pyjs__exception_func_param(arguments.callee.__name__, 3, 3, arguments.length+1);
			} else {
				var self = arguments[0];
				key = arguments[1];
				default_value = arguments[2];
				if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
				if (pyjs_options.arg_count && arguments.length != 3) pyjs__exception_func_param(arguments.callee.__name__, 3, 3, arguments.length);
			}
			if (pyjs_options.arg_instance_type) {
				if (self.prototype.__md5__ !== '992544cebd6c82ba4f4c477a27ae5805') {
					if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
						pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					}
				}
			}
			if (pyjslib.bool(!(self.has_key(key)))) {
				self.__setitem__(key, default_value);
			}
			return self.__getitem__(key);
		}
		, function ( __kwargs, key, default_value ) {
			if (typeof key == 'undefined') {
				key=__kwargs.key;
				delete __kwargs.key;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.key != 'undefined') {
				pyjs__exception_func_multiple_values('setdefault', 'key');
			}
			if (typeof default_value == 'undefined') {
				default_value=__kwargs.default_value;
				delete __kwargs.default_value;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.default_value != 'undefined') {
				pyjs__exception_func_multiple_values('setdefault', 'default_value');
			}
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('setdefault', i);
				}
			}
			var __r = [key, default_value];
			for (var pyjs__va_arg = 3;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		});
		cls_definition.get = pyjs__bind_method(cls_instance, 'get', function(key, default_) {
			if (this.__is_instance__ === true) {
				var self = this;
				if (pyjs_options.arg_count && (arguments.length < 1 || arguments.length > 2)) pyjs__exception_func_param(arguments.callee.__name__, 2, 3, arguments.length+1);
			} else {
				var self = arguments[0];
				key = arguments[1];
				default_ = arguments[2];
				if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
				if (pyjs_options.arg_count && (arguments.length < 2 || arguments.length > 3)) pyjs__exception_func_param(arguments.callee.__name__, 2, 3, arguments.length);
			}
			if (pyjs_options.arg_instance_type) {
				if (self.prototype.__md5__ !== '992544cebd6c82ba4f4c477a27ae5805') {
					if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
						pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					}
				}
			}
			if (typeof default_ == 'undefined') default_=null;
			if (pyjslib.bool(!(self.has_key(key)))) {
				return default_;
			}
			return self.__getitem__(key);
		}
		, function ( __kwargs, key, default_ ) {
			if (typeof key == 'undefined') {
				key=__kwargs.key;
				delete __kwargs.key;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.key != 'undefined') {
				pyjs__exception_func_multiple_values('get', 'key');
			}
			if (typeof default_ == 'undefined') {
				default_=__kwargs.default_;
				delete __kwargs.default_;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.default_ != 'undefined') {
				pyjs__exception_func_multiple_values('get', 'default_');
			}
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('get', i);
				}
			}
			var __r = [key, default_];
			for (var pyjs__va_arg = 3;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		});
		cls_definition.update = pyjs__bind_method(cls_instance, 'update', function(d) {
			if (this.__is_instance__ === true) {
				var self = this;
				if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 2, 2, arguments.length+1);
			} else {
				var self = arguments[0];
				d = arguments[1];
				if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
				if (pyjs_options.arg_count && arguments.length != 2) pyjs__exception_func_param(arguments.callee.__name__, 2, 2, arguments.length);
			}
			if (pyjs_options.arg_instance_type) {
				if (self.prototype.__md5__ !== '992544cebd6c82ba4f4c477a27ae5805') {
					if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
						pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					}
				}
			}
			var __temp_k = d.iteritems().__iter__();
			try {
				while (true) {
					var temp_k = __temp_k.next();
								var k = temp_k.__getitem__(0);
                			var v = temp_k.__getitem__(1);
                
					self.__setitem__(k, v);
				}
			} catch (e) {
				if (e.__name__ != 'StopIteration') {
					throw e;
				}
			}
			return null;
		}
		, function ( __kwargs, d ) {
			if (typeof d == 'undefined') {
				d=__kwargs.d;
				delete __kwargs.d;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.d != 'undefined') {
				pyjs__exception_func_multiple_values('update', 'd');
			}
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('update', i);
				}
			}
			var __r = [d];
			for (var pyjs__va_arg = 2;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		});
		cls_definition.getObject = pyjs__bind_method(cls_instance, 'getObject', function() {
			if (this.__is_instance__ === true) {
				var self = this;
				if (pyjs_options.arg_count && arguments.length != 0) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length+1);
			} else {
				var self = arguments[0];
				if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
				if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length);
			}
			if (pyjs_options.arg_instance_type) {
				if (self.prototype.__md5__ !== '992544cebd6c82ba4f4c477a27ae5805') {
					if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
						pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					}
				}
			}
			return (self.d===undefined?(function(){throw new TypeError('self.d is undefined')})():(typeof self.d == 'function' && self.__is_instance__?pyjslib.getattr(self, 'd'):self.d));
		}
		, function ( __kwargs ) {
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('getObject', i);
				}
			}
			var __r = [];
			for (var pyjs__va_arg = 1;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		});
		cls_definition.copy = pyjs__bind_method(cls_instance, 'copy', function() {
			if (this.__is_instance__ === true) {
				var self = this;
				if (pyjs_options.arg_count && arguments.length != 0) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length+1);
			} else {
				var self = arguments[0];
				if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
				if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length);
			}
			if (pyjs_options.arg_instance_type) {
				if (self.prototype.__md5__ !== '992544cebd6c82ba4f4c477a27ae5805') {
					if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
						pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					}
				}
			}
			return pyjslib.Dict(self.items());
		}
		, function ( __kwargs ) {
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('copy', i);
				}
			}
			var __r = [];
			for (var pyjs__va_arg = 1;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		});
		cls_definition.__str__ = pyjs__bind_method(cls_instance, '__str__', function() {
			if (this.__is_instance__ === true) {
				var self = this;
				if (pyjs_options.arg_count && arguments.length != 0) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length+1);
			} else {
				var self = arguments[0];
				if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
				if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length);
			}
			if (pyjs_options.arg_instance_type) {
				if (self.prototype.__md5__ !== '992544cebd6c82ba4f4c477a27ae5805') {
					if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
						pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					}
				}
			}
			return self.__repr__();
		}
		, function ( __kwargs ) {
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('__str__', i);
				}
			}
			var __r = [];
			for (var pyjs__va_arg = 1;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		});
		cls_definition.toString = pyjs__bind_method(cls_instance, 'toString', function() {
			if (this.__is_instance__ === true) {
				var self = this;
				if (pyjs_options.arg_count && arguments.length != 0) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length+1);
			} else {
				var self = arguments[0];
				if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
				if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length);
			}
			if (pyjs_options.arg_instance_type) {
				if (self.prototype.__md5__ !== '992544cebd6c82ba4f4c477a27ae5805') {
					if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
						pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					}
				}
			}
			return self.__repr__();
		}
		, function ( __kwargs ) {
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('toString', i);
				}
			}
			var __r = [];
			for (var pyjs__va_arg = 1;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		});
		cls_definition.__repr__ = pyjs__bind_method(cls_instance, '__repr__', function() {
			if (this.__is_instance__ === true) {
				var self = this;
				if (pyjs_options.arg_count && arguments.length != 0) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length+1);
			} else {
				var self = arguments[0];
				if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
				if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length);
			}
			if (pyjs_options.arg_instance_type) {
				if (self.prototype.__md5__ !== '992544cebd6c82ba4f4c477a27ae5805') {
					if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
						pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					}
				}
			}

        var keys = new Array();
        for (var key in self.d)
            keys.push(key);

        var s = "{";
        for (var i=0; i<keys.length; i++) {
            var v = self.d[keys[i]]
            s += pyjslib.repr(v[0]) + ": " + pyjslib.repr(v[1]);
            if (i < keys.length-1)
                s += ", "
        };
        s += "}";
        return s;
        
		}
		, function ( __kwargs ) {
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('__repr__', i);
				}
			}
			var __r = [];
			for (var pyjs__va_arg = 1;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		});
		return pyjs__class_function(cls_instance, cls_definition, 
		                            new Array(pyjslib.object));
	})();
	track.lineno=1154;
	pyjslib.dict = pyjslib.Dict;
	track.lineno=1158;
	pyjslib._super = function(type_, object_or_type) {
		if (pyjs_options.arg_count && (arguments.length < 1 || arguments.length > 2)) pyjs__exception_func_param(arguments.callee.__name__, 1, 2, arguments.length);
		if (typeof object_or_type == 'undefined') object_or_type=null;
		if (pyjslib.bool(!(pyjslib._issubtype(object_or_type, type_)))) {
			throw (pyjslib.TypeError(String('super(type, obj): obj must be an instance or subtype of type')));
		}

    var fn = pyjs_type('super', type_.__mro__.slice(1), {})
    fn.__new__ = fn.__mro__[1].__new__;
    fn.__init__ = fn.__mro__[1].__init__;
    if (object_or_type.__is_instance__ === false) {
        return fn;
    }
    var obj = new Object();
    function wrapper(obj, name) {
        var fnwrap = function() {
            var args = [];
            for (var i = 0; i < arguments.length; i++) {
              args.push(arguments[i]);
            }
            return obj[name].apply(object_or_type,args);
        }
        fnwrap.__name__ = name;
        fnwrap.parse_kwargs = obj.parse_kwargs;
        return fnwrap;
    }
    for (var m in fn) {
        if (typeof fn[m] == 'function') {
            obj[m] = wrapper(fn, m);
        }
    }
    return obj;
    
	};
	pyjslib._super.__name__ = '_super';

	pyjslib._super.parse_kwargs = function ( __kwargs, type_, object_or_type ) {
		if (typeof type_ == 'undefined') {
			type_=__kwargs.type_;
			delete __kwargs.type_;
		} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.type_ != 'undefined') {
			pyjs__exception_func_multiple_values('pyjslib._super', 'type_');
		}
		if (typeof object_or_type == 'undefined') {
			object_or_type=__kwargs.object_or_type;
			delete __kwargs.object_or_type;
		} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.object_or_type != 'undefined') {
			pyjs__exception_func_multiple_values('pyjslib._super', 'object_or_type');
		}
		if (pyjs_options.arg_kwarg_unexpected_keyword) {
			for (var i in __kwargs) {
				pyjs__exception_func_unexpected_keyword('pyjslib._super', i);
			}
		}
		var __r = [type_, object_or_type];
		for (var pyjs__va_arg = 3;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
			__r.push(arguments[pyjs__va_arg]);
		}

		return __r;
	};
	track.lineno=1192;
	pyjslib.range = function(start, stop, step) {
		if (pyjs_options.arg_count && (arguments.length < 1 || arguments.length > 3)) pyjs__exception_func_param(arguments.callee.__name__, 1, 3, arguments.length);
		if (typeof stop == 'undefined') stop=null;
		if (typeof step == 'undefined') step=1;
		if (pyjslib.bool((stop === null))) {
			stop = start;
			start = 0;
		}

/*
    var start = 0;
    var stop = 0;
    var step = 1;

    if (arguments.length == 2) {
        start = arguments[0];
        stop = arguments[1];
        }
    else if (arguments.length == 3) {
        start = arguments[0];
        stop = arguments[1];
        step = arguments[2];
        }
    else if (arguments.length>0) stop = arguments[0];
*/
    return {
        'next': function() {
            if ((step > 0 && start >= stop) || (step < 0 && start <= stop)) throw pyjslib.StopIteration;
            var rval = start;
            start += step;
            return rval;
            },
        '__iter__': function() {
            return this;
            }
        }
    
	};
	pyjslib.range.__name__ = 'range';

	pyjslib.range.parse_kwargs = function ( __kwargs, start, stop, step ) {
		if (typeof start == 'undefined') {
			start=__kwargs.start;
			delete __kwargs.start;
		} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.start != 'undefined') {
			pyjs__exception_func_multiple_values('pyjslib.range', 'start');
		}
		if (typeof stop == 'undefined') {
			stop=__kwargs.stop;
			delete __kwargs.stop;
		} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.stop != 'undefined') {
			pyjs__exception_func_multiple_values('pyjslib.range', 'stop');
		}
		if (typeof step == 'undefined') {
			step=__kwargs.step;
			delete __kwargs.step;
		} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.step != 'undefined') {
			pyjs__exception_func_multiple_values('pyjslib.range', 'step');
		}
		if (pyjs_options.arg_kwarg_unexpected_keyword) {
			for (var i in __kwargs) {
				pyjs__exception_func_unexpected_keyword('pyjslib.range', i);
			}
		}
		var __r = [start, stop, step];
		for (var pyjs__va_arg = 4;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
			__r.push(arguments[pyjs__va_arg]);
		}

		return __r;
	};
	track.lineno=1227;
	pyjslib.slice = function(object, lower, upper) {
		if (pyjs_options.arg_count && arguments.length != 3) pyjs__exception_func_param(arguments.callee.__name__, 3, 3, arguments.length);

    if (pyjslib.isString(object)) {
        if (lower < 0) {
           lower = object.length + lower;
        }
        if (upper < 0) {
           upper = object.length + upper;
        }
        if (pyjslib.isNull(upper)) upper=object.length;
        return object.substring(lower, upper);
    }
    if (pyjslib.isObject(object) && object.slice)
        return object.slice(lower, upper);

    return null;
    
	};
	pyjslib.slice.__name__ = 'slice';

	pyjslib.slice.parse_kwargs = function ( __kwargs, object, lower, upper ) {
		if (typeof object == 'undefined') {
			object=__kwargs.object;
			delete __kwargs.object;
		} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.object != 'undefined') {
			pyjs__exception_func_multiple_values('pyjslib.slice', 'object');
		}
		if (typeof lower == 'undefined') {
			lower=__kwargs.lower;
			delete __kwargs.lower;
		} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.lower != 'undefined') {
			pyjs__exception_func_multiple_values('pyjslib.slice', 'lower');
		}
		if (typeof upper == 'undefined') {
			upper=__kwargs.upper;
			delete __kwargs.upper;
		} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.upper != 'undefined') {
			pyjs__exception_func_multiple_values('pyjslib.slice', 'upper');
		}
		if (pyjs_options.arg_kwarg_unexpected_keyword) {
			for (var i in __kwargs) {
				pyjs__exception_func_unexpected_keyword('pyjslib.slice', i);
			}
		}
		var __r = [object, lower, upper];
		for (var pyjs__va_arg = 4;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
			__r.push(arguments[pyjs__va_arg]);
		}

		return __r;
	};
	track.lineno=1246;
	pyjslib.str = function(text) {
		if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length);

    if (pyjslib.hasattr(text,"__str__")) {
        return text.__str__();
    }
    return String(text);
    
	};
	pyjslib.str.__name__ = 'str';

	pyjslib.str.parse_kwargs = function ( __kwargs, text ) {
		if (typeof text == 'undefined') {
			text=__kwargs.text;
			delete __kwargs.text;
		} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.text != 'undefined') {
			pyjs__exception_func_multiple_values('pyjslib.str', 'text');
		}
		if (pyjs_options.arg_kwarg_unexpected_keyword) {
			for (var i in __kwargs) {
				pyjs__exception_func_unexpected_keyword('pyjslib.str', i);
			}
		}
		var __r = [text];
		for (var pyjs__va_arg = 2;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
			__r.push(arguments[pyjs__va_arg]);
		}

		return __r;
	};
	track.lineno=1255;
	pyjslib.ord = function(x) {
		if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length);
		if (pyjslib.bool((pyjslib.isString(x)) && ((pyjslib.len(x) === 1)))) {

            return x.charCodeAt(0);
        
		}
		else {

            throw pyjslib.TypeError();
        
		}
		return null;
	};
	pyjslib.ord.__name__ = 'ord';

	pyjslib.ord.parse_kwargs = function ( __kwargs, x ) {
		if (typeof x == 'undefined') {
			x=__kwargs.x;
			delete __kwargs.x;
		} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.x != 'undefined') {
			pyjs__exception_func_multiple_values('pyjslib.ord', 'x');
		}
		if (pyjs_options.arg_kwarg_unexpected_keyword) {
			for (var i in __kwargs) {
				pyjs__exception_func_unexpected_keyword('pyjslib.ord', i);
			}
		}
		var __r = [x];
		for (var pyjs__va_arg = 2;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
			__r.push(arguments[pyjs__va_arg]);
		}

		return __r;
	};
	track.lineno=1267;
	pyjslib.chr = function(x) {
		if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length);

        return String.fromCharCode(x)
    
	};
	pyjslib.chr.__name__ = 'chr';

	pyjslib.chr.parse_kwargs = function ( __kwargs, x ) {
		if (typeof x == 'undefined') {
			x=__kwargs.x;
			delete __kwargs.x;
		} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.x != 'undefined') {
			pyjs__exception_func_multiple_values('pyjslib.chr', 'x');
		}
		if (pyjs_options.arg_kwarg_unexpected_keyword) {
			for (var i in __kwargs) {
				pyjs__exception_func_unexpected_keyword('pyjslib.chr', i);
			}
		}
		var __r = [x];
		for (var pyjs__va_arg = 2;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
			__r.push(arguments[pyjs__va_arg]);
		}

		return __r;
	};
	track.lineno=1273;
	pyjslib.is_basetype = function(x) {
		if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length);

       var t = typeof(x);
       return t == 'boolean' ||
       t == 'function' ||
       t == 'number' ||
       t == 'string' ||
       t == 'undefined'
       ;
    
	};
	pyjslib.is_basetype.__name__ = 'is_basetype';

	pyjslib.is_basetype.parse_kwargs = function ( __kwargs, x ) {
		if (typeof x == 'undefined') {
			x=__kwargs.x;
			delete __kwargs.x;
		} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.x != 'undefined') {
			pyjs__exception_func_multiple_values('pyjslib.is_basetype', 'x');
		}
		if (pyjs_options.arg_kwarg_unexpected_keyword) {
			for (var i in __kwargs) {
				pyjs__exception_func_unexpected_keyword('pyjslib.is_basetype', i);
			}
		}
		var __r = [x];
		for (var pyjs__va_arg = 2;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
			__r.push(arguments[pyjs__va_arg]);
		}

		return __r;
	};
	track.lineno=1285;
	pyjslib.get_pyjs_classtype = function(x) {
		if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length);

        if (pyjslib.hasattr(x, "__is_instance__")) {
            var src = x.__name__;
            return src;
        }
        return null;
    
	};
	pyjslib.get_pyjs_classtype.__name__ = 'get_pyjs_classtype';

	pyjslib.get_pyjs_classtype.parse_kwargs = function ( __kwargs, x ) {
		if (typeof x == 'undefined') {
			x=__kwargs.x;
			delete __kwargs.x;
		} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.x != 'undefined') {
			pyjs__exception_func_multiple_values('pyjslib.get_pyjs_classtype', 'x');
		}
		if (pyjs_options.arg_kwarg_unexpected_keyword) {
			for (var i in __kwargs) {
				pyjs__exception_func_unexpected_keyword('pyjslib.get_pyjs_classtype', i);
			}
		}
		var __r = [x];
		for (var pyjs__va_arg = 2;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
			__r.push(arguments[pyjs__va_arg]);
		}

		return __r;
	};
	track.lineno=1295;
	pyjslib.repr = function(x) {
		if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length);
		if (pyjslib.bool(pyjslib.hasattr(x, String('__repr__')))) {
			return x.__repr__();
		}

       if (x === null)
           return "null";

       if (x === undefined)
           return "undefined";

       var t = typeof(x);

        //alert("repr typeof " + t + " : " + x);

       if (t == "boolean")
           return x.toString();

       if (t == "function")
           return "<function " + x.toString() + ">";

       if (t == "number")
           return x.toString();

       if (t == "string") {
           if (x.indexOf("'") == -1)
               return "'" + x + "'";
           if (x.indexOf('"') == -1)
               return '"' + x + '"';
           var s = x.replace(new RegExp('"', "g"), '\\"');
           return '"' + s + '"';
       };

       if (t == "undefined")
           return "undefined";

       // If we get here, x is an object.  See if it's a Pyjamas class.

       if (!pyjslib.hasattr(x, "__init__"))
           return "<" + x.toString() + ">";

       // Handle the common Pyjamas data types.

       var constructor = "UNKNOWN";

       constructor = pyjslib.get_pyjs_classtype(x);

        //alert("repr constructor: " + constructor);

       // If we get here, the class isn't one we know -> return the class name.
       // Note that we replace underscores with dots so that the name will
       // (hopefully!) look like the original Python name.

       //var s = constructor.replace(new RegExp('_', "g"), '.');
       return "<" + constructor + " object>";
    
	};
	pyjslib.repr.__name__ = 'repr';

	pyjslib.repr.parse_kwargs = function ( __kwargs, x ) {
		if (typeof x == 'undefined') {
			x=__kwargs.x;
			delete __kwargs.x;
		} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.x != 'undefined') {
			pyjs__exception_func_multiple_values('pyjslib.repr', 'x');
		}
		if (pyjs_options.arg_kwarg_unexpected_keyword) {
			for (var i in __kwargs) {
				pyjs__exception_func_unexpected_keyword('pyjslib.repr', i);
			}
		}
		var __r = [x];
		for (var pyjs__va_arg = 2;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
			__r.push(arguments[pyjs__va_arg]);
		}

		return __r;
	};
	track.lineno=1354;
	pyjslib.float = function(text) {
		if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length);

    return parseFloat(text);
    
	};
	pyjslib.float.__name__ = 'float';

	pyjslib.float.parse_kwargs = function ( __kwargs, text ) {
		if (typeof text == 'undefined') {
			text=__kwargs.text;
			delete __kwargs.text;
		} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.text != 'undefined') {
			pyjs__exception_func_multiple_values('pyjslib.float', 'text');
		}
		if (pyjs_options.arg_kwarg_unexpected_keyword) {
			for (var i in __kwargs) {
				pyjs__exception_func_unexpected_keyword('pyjslib.float', i);
			}
		}
		var __r = [text];
		for (var pyjs__va_arg = 2;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
			__r.push(arguments[pyjs__va_arg]);
		}

		return __r;
	};
	track.lineno=1360;
	pyjslib.int = function(text, radix) {
		if (pyjs_options.arg_count && (arguments.length < 1 || arguments.length > 2)) pyjs__exception_func_param(arguments.callee.__name__, 1, 2, arguments.length);
		if (typeof radix == 'undefined') radix=0;

    return parseInt(text, radix);
    
	};
	pyjslib.int.__name__ = 'int';

	pyjslib.int.parse_kwargs = function ( __kwargs, text, radix ) {
		if (typeof text == 'undefined') {
			text=__kwargs.text;
			delete __kwargs.text;
		} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.text != 'undefined') {
			pyjs__exception_func_multiple_values('pyjslib.int', 'text');
		}
		if (typeof radix == 'undefined') {
			radix=__kwargs.radix;
			delete __kwargs.radix;
		} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.radix != 'undefined') {
			pyjs__exception_func_multiple_values('pyjslib.int', 'radix');
		}
		if (pyjs_options.arg_kwarg_unexpected_keyword) {
			for (var i in __kwargs) {
				pyjs__exception_func_unexpected_keyword('pyjslib.int', i);
			}
		}
		var __r = [text, radix];
		for (var pyjs__va_arg = 3;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
			__r.push(arguments[pyjs__va_arg]);
		}

		return __r;
	};
	track.lineno=1366;
	pyjslib.len = function(object) {
		if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length);

    if (object==null) return 0;
    if (pyjslib.isObject(object) && object.__len__) return object.__len__();
    return object.length;
    
	};
	pyjslib.len.__name__ = 'len';

	pyjslib.len.parse_kwargs = function ( __kwargs, object ) {
		if (typeof object == 'undefined') {
			object=__kwargs.object;
			delete __kwargs.object;
		} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.object != 'undefined') {
			pyjs__exception_func_multiple_values('pyjslib.len', 'object');
		}
		if (pyjs_options.arg_kwarg_unexpected_keyword) {
			for (var i in __kwargs) {
				pyjs__exception_func_unexpected_keyword('pyjslib.len', i);
			}
		}
		var __r = [object];
		for (var pyjs__va_arg = 2;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
			__r.push(arguments[pyjs__va_arg]);
		}

		return __r;
	};
	track.lineno=1374;
	pyjslib.isinstance = function(object_, classinfo) {
		if (pyjs_options.arg_count && arguments.length != 2) pyjs__exception_func_param(arguments.callee.__name__, 2, 2, arguments.length);
		if (pyjslib.bool(pyjslib.isUndefined(object_))) {
			return false;
		}
		if (pyjslib.bool(!(pyjslib.isObject(object_)))) {
			return false;
		}
		if (pyjslib.bool(pyjslib._isinstance(classinfo, pyjslib.Tuple))) {
			var __ci = classinfo.__iter__();
			try {
				while (true) {
					var ci = __ci.next();
					
					if (pyjslib.bool(pyjslib.isinstance(object_, ci))) {
						return true;
					}
				}
			} catch (e) {
				if (e.__name__ != 'StopIteration') {
					throw e;
				}
			}
			return false;
		}
		else {
			return pyjslib._isinstance(object_, classinfo);
		}
		return null;
	};
	pyjslib.isinstance.__name__ = 'isinstance';

	pyjslib.isinstance.parse_kwargs = function ( __kwargs, object_, classinfo ) {
		if (typeof object_ == 'undefined') {
			object_=__kwargs.object_;
			delete __kwargs.object_;
		} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.object_ != 'undefined') {
			pyjs__exception_func_multiple_values('pyjslib.isinstance', 'object_');
		}
		if (typeof classinfo == 'undefined') {
			classinfo=__kwargs.classinfo;
			delete __kwargs.classinfo;
		} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.classinfo != 'undefined') {
			pyjs__exception_func_multiple_values('pyjslib.isinstance', 'classinfo');
		}
		if (pyjs_options.arg_kwarg_unexpected_keyword) {
			for (var i in __kwargs) {
				pyjs__exception_func_unexpected_keyword('pyjslib.isinstance', i);
			}
		}
		var __r = [object_, classinfo];
		for (var pyjs__va_arg = 3;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
			__r.push(arguments[pyjs__va_arg]);
		}

		return __r;
	};
	track.lineno=1389;
	pyjslib._isinstance = function(object_, classinfo) {
		if (pyjs_options.arg_count && arguments.length != 2) pyjs__exception_func_param(arguments.callee.__name__, 2, 2, arguments.length);

    if (object_.__is_instance__ !== true) {
        return false;
    }
    for (var c in object_.__mro__) {
        if (object_.__mro__[c].__md5__ == classinfo.prototype.__md5__) return true;
    }
    return false;
    
	};
	pyjslib._isinstance.__name__ = '_isinstance';

	pyjslib._isinstance.parse_kwargs = function ( __kwargs, object_, classinfo ) {
		if (typeof object_ == 'undefined') {
			object_=__kwargs.object_;
			delete __kwargs.object_;
		} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.object_ != 'undefined') {
			pyjs__exception_func_multiple_values('pyjslib._isinstance', 'object_');
		}
		if (typeof classinfo == 'undefined') {
			classinfo=__kwargs.classinfo;
			delete __kwargs.classinfo;
		} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.classinfo != 'undefined') {
			pyjs__exception_func_multiple_values('pyjslib._isinstance', 'classinfo');
		}
		if (pyjs_options.arg_kwarg_unexpected_keyword) {
			for (var i in __kwargs) {
				pyjs__exception_func_unexpected_keyword('pyjslib._isinstance', i);
			}
		}
		var __r = [object_, classinfo];
		for (var pyjs__va_arg = 3;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
			__r.push(arguments[pyjs__va_arg]);
		}

		return __r;
	};
	track.lineno=1401;
	pyjslib._issubtype = function(object_, classinfo) {
		if (pyjs_options.arg_count && arguments.length != 2) pyjs__exception_func_param(arguments.callee.__name__, 2, 2, arguments.length);

    if (object_.__is_instance__ == null || classinfo.__is_instance__ == null) {
        return false;
    }
    for (var c in object_.__mro__) {
        if (object_.__mro__[c] == classinfo.prototype) return true;
    }
    return false;
    
	};
	pyjslib._issubtype.__name__ = '_issubtype';

	pyjslib._issubtype.parse_kwargs = function ( __kwargs, object_, classinfo ) {
		if (typeof object_ == 'undefined') {
			object_=__kwargs.object_;
			delete __kwargs.object_;
		} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.object_ != 'undefined') {
			pyjs__exception_func_multiple_values('pyjslib._issubtype', 'object_');
		}
		if (typeof classinfo == 'undefined') {
			classinfo=__kwargs.classinfo;
			delete __kwargs.classinfo;
		} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.classinfo != 'undefined') {
			pyjs__exception_func_multiple_values('pyjslib._issubtype', 'classinfo');
		}
		if (pyjs_options.arg_kwarg_unexpected_keyword) {
			for (var i in __kwargs) {
				pyjs__exception_func_unexpected_keyword('pyjslib._issubtype', i);
			}
		}
		var __r = [object_, classinfo];
		for (var pyjs__va_arg = 3;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
			__r.push(arguments[pyjs__va_arg]);
		}

		return __r;
	};
	track.lineno=1413;
	pyjslib.getattr = function(obj, name, default_) {
		if (pyjs_options.arg_count && (arguments.length < 2 || arguments.length > 3)) pyjs__exception_func_param(arguments.callee.__name__, 2, 3, arguments.length);
		if (typeof default_ == 'undefined') default_=null;

    if ((!pyjslib.isObject(obj))||(pyjslib.isUndefined(obj[name]))){
        if (arguments.length != 3){
            throw pyjslib.AttributeError(obj, name);
        }else{
        return default_;
        }
    }
    if (!pyjslib.isFunction(obj[name])) return obj[name];
    var method = obj[name];
    var fnwrap = function() {
        var args = [];
        for (var i = 0; i < arguments.length; i++) {
          args.push(arguments[i]);
        }
        return method.apply(obj,args);
    }
    fnwrap.__name__ = name;
    fnwrap.parse_kwargs = obj.parse_kwargs;
    return fnwrap;
    
	};
	pyjslib.getattr.__name__ = 'getattr';

	pyjslib.getattr.parse_kwargs = function ( __kwargs, obj, name, default_ ) {
		if (typeof obj == 'undefined') {
			obj=__kwargs.obj;
			delete __kwargs.obj;
		} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.obj != 'undefined') {
			pyjs__exception_func_multiple_values('pyjslib.getattr', 'obj');
		}
		if (typeof name == 'undefined') {
			name=__kwargs.name;
			delete __kwargs.name;
		} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.name != 'undefined') {
			pyjs__exception_func_multiple_values('pyjslib.getattr', 'name');
		}
		if (typeof default_ == 'undefined') {
			default_=__kwargs.default_;
			delete __kwargs.default_;
		} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.default_ != 'undefined') {
			pyjs__exception_func_multiple_values('pyjslib.getattr', 'default_');
		}
		if (pyjs_options.arg_kwarg_unexpected_keyword) {
			for (var i in __kwargs) {
				pyjs__exception_func_unexpected_keyword('pyjslib.getattr', i);
			}
		}
		var __r = [obj, name, default_];
		for (var pyjs__va_arg = 4;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
			__r.push(arguments[pyjs__va_arg]);
		}

		return __r;
	};
	track.lineno=1437;
	pyjslib.delattr = function(obj, name) {
		if (pyjs_options.arg_count && arguments.length != 2) pyjs__exception_func_param(arguments.callee.__name__, 2, 2, arguments.length);

    if (!pyjslib.isObject(obj)) {
       throw pyjslib.AttributeError("'"+typeof(obj)+"' object has no attribute '"+name+"%s'")
    }
    if ((pyjslib.isUndefined(obj[name])) ||(typeof(obj[name]) == "function") ){
        throw pyjslib.AttributeError(obj.__name__+" instance has no attribute '"+ name+"'");
    }
    delete obj[name];
    
	};
	pyjslib.delattr.__name__ = 'delattr';

	pyjslib.delattr.parse_kwargs = function ( __kwargs, obj, name ) {
		if (typeof obj == 'undefined') {
			obj=__kwargs.obj;
			delete __kwargs.obj;
		} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.obj != 'undefined') {
			pyjs__exception_func_multiple_values('pyjslib.delattr', 'obj');
		}
		if (typeof name == 'undefined') {
			name=__kwargs.name;
			delete __kwargs.name;
		} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.name != 'undefined') {
			pyjs__exception_func_multiple_values('pyjslib.delattr', 'name');
		}
		if (pyjs_options.arg_kwarg_unexpected_keyword) {
			for (var i in __kwargs) {
				pyjs__exception_func_unexpected_keyword('pyjslib.delattr', i);
			}
		}
		var __r = [obj, name];
		for (var pyjs__va_arg = 3;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
			__r.push(arguments[pyjs__va_arg]);
		}

		return __r;
	};
	track.lineno=1449;
	pyjslib.setattr = function(obj, name, value) {
		if (pyjs_options.arg_count && arguments.length != 3) pyjs__exception_func_param(arguments.callee.__name__, 3, 3, arguments.length);

    if (!pyjslib.isObject(obj)) return null;

    obj[name] = value;

    
	};
	pyjslib.setattr.__name__ = 'setattr';

	pyjslib.setattr.parse_kwargs = function ( __kwargs, obj, name, value ) {
		if (typeof obj == 'undefined') {
			obj=__kwargs.obj;
			delete __kwargs.obj;
		} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.obj != 'undefined') {
			pyjs__exception_func_multiple_values('pyjslib.setattr', 'obj');
		}
		if (typeof name == 'undefined') {
			name=__kwargs.name;
			delete __kwargs.name;
		} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.name != 'undefined') {
			pyjs__exception_func_multiple_values('pyjslib.setattr', 'name');
		}
		if (typeof value == 'undefined') {
			value=__kwargs.value;
			delete __kwargs.value;
		} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.value != 'undefined') {
			pyjs__exception_func_multiple_values('pyjslib.setattr', 'value');
		}
		if (pyjs_options.arg_kwarg_unexpected_keyword) {
			for (var i in __kwargs) {
				pyjs__exception_func_unexpected_keyword('pyjslib.setattr', i);
			}
		}
		var __r = [obj, name, value];
		for (var pyjs__va_arg = 4;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
			__r.push(arguments[pyjs__va_arg]);
		}

		return __r;
	};
	track.lineno=1458;
	pyjslib.hasattr = function(obj, name) {
		if (pyjs_options.arg_count && arguments.length != 2) pyjs__exception_func_param(arguments.callee.__name__, 2, 2, arguments.length);

    if (!pyjslib.isObject(obj)) return false;
    if (pyjslib.isUndefined(obj[name])) return false;

    return true;
    
	};
	pyjslib.hasattr.__name__ = 'hasattr';

	pyjslib.hasattr.parse_kwargs = function ( __kwargs, obj, name ) {
		if (typeof obj == 'undefined') {
			obj=__kwargs.obj;
			delete __kwargs.obj;
		} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.obj != 'undefined') {
			pyjs__exception_func_multiple_values('pyjslib.hasattr', 'obj');
		}
		if (typeof name == 'undefined') {
			name=__kwargs.name;
			delete __kwargs.name;
		} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.name != 'undefined') {
			pyjs__exception_func_multiple_values('pyjslib.hasattr', 'name');
		}
		if (pyjs_options.arg_kwarg_unexpected_keyword) {
			for (var i in __kwargs) {
				pyjs__exception_func_unexpected_keyword('pyjslib.hasattr', i);
			}
		}
		var __r = [obj, name];
		for (var pyjs__va_arg = 3;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
			__r.push(arguments[pyjs__va_arg]);
		}

		return __r;
	};
	track.lineno=1467;
	pyjslib.dir = function(obj) {
		if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length);

    var properties=new pyjslib.List();
    for (property in obj) properties.append(property);
    return properties;
    
	};
	pyjslib.dir.__name__ = 'dir';

	pyjslib.dir.parse_kwargs = function ( __kwargs, obj ) {
		if (typeof obj == 'undefined') {
			obj=__kwargs.obj;
			delete __kwargs.obj;
		} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.obj != 'undefined') {
			pyjs__exception_func_multiple_values('pyjslib.dir', 'obj');
		}
		if (pyjs_options.arg_kwarg_unexpected_keyword) {
			for (var i in __kwargs) {
				pyjs__exception_func_unexpected_keyword('pyjslib.dir', i);
			}
		}
		var __r = [obj];
		for (var pyjs__va_arg = 2;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
			__r.push(arguments[pyjs__va_arg]);
		}

		return __r;
	};
	track.lineno=1475;
	pyjslib.filter = function(obj, method, sequence) {
		if (pyjs_options.arg_count && (arguments.length < 2 || arguments.length > 3)) pyjs__exception_func_param(arguments.callee.__name__, 2, 3, arguments.length);
		if (typeof sequence == 'undefined') sequence=null;
		var items = new pyjslib.List([]);
		if (pyjslib.bool((sequence === null))) {
			sequence = method;
			method = obj;
			var __item = sequence.__iter__();
			try {
				while (true) {
					var item = __item.next();
					
					if (pyjslib.bool(method(item))) {
						items.append(item);
					}
				}
			} catch (e) {
				if (e.__name__ != 'StopIteration') {
					throw e;
				}
			}
		}
		else {
			var __item = sequence.__iter__();
			try {
				while (true) {
					var item = __item.next();
					
					if (pyjslib.bool(method.call_(obj, item))) {
						items.append(item);
					}
				}
			} catch (e) {
				if (e.__name__ != 'StopIteration') {
					throw e;
				}
			}
		}
		return items;
	};
	pyjslib.filter.__name__ = 'filter';

	pyjslib.filter.parse_kwargs = function ( __kwargs, obj, method, sequence ) {
		if (typeof obj == 'undefined') {
			obj=__kwargs.obj;
			delete __kwargs.obj;
		} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.obj != 'undefined') {
			pyjs__exception_func_multiple_values('pyjslib.filter', 'obj');
		}
		if (typeof method == 'undefined') {
			method=__kwargs.method;
			delete __kwargs.method;
		} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.method != 'undefined') {
			pyjs__exception_func_multiple_values('pyjslib.filter', 'method');
		}
		if (typeof sequence == 'undefined') {
			sequence=__kwargs.sequence;
			delete __kwargs.sequence;
		} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.sequence != 'undefined') {
			pyjs__exception_func_multiple_values('pyjslib.filter', 'sequence');
		}
		if (pyjs_options.arg_kwarg_unexpected_keyword) {
			for (var i in __kwargs) {
				pyjs__exception_func_unexpected_keyword('pyjslib.filter', i);
			}
		}
		var __r = [obj, method, sequence];
		for (var pyjs__va_arg = 4;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
			__r.push(arguments[pyjs__va_arg]);
		}

		return __r;
	};
	track.lineno=1495;
	pyjslib.map = function(obj, method, sequence) {
		if (pyjs_options.arg_count && (arguments.length < 2 || arguments.length > 3)) pyjs__exception_func_param(arguments.callee.__name__, 2, 3, arguments.length);
		if (typeof sequence == 'undefined') sequence=null;
		var items = new pyjslib.List([]);
		if (pyjslib.bool((sequence === null))) {
			sequence = method;
			method = obj;
			var __item = sequence.__iter__();
			try {
				while (true) {
					var item = __item.next();
					
					items.append(method(item));
				}
			} catch (e) {
				if (e.__name__ != 'StopIteration') {
					throw e;
				}
			}
		}
		else {
			var __item = sequence.__iter__();
			try {
				while (true) {
					var item = __item.next();
					
					items.append(method.call_(obj, item));
				}
			} catch (e) {
				if (e.__name__ != 'StopIteration') {
					throw e;
				}
			}
		}
		return items;
	};
	pyjslib.map.__name__ = 'map';

	pyjslib.map.parse_kwargs = function ( __kwargs, obj, method, sequence ) {
		if (typeof obj == 'undefined') {
			obj=__kwargs.obj;
			delete __kwargs.obj;
		} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.obj != 'undefined') {
			pyjs__exception_func_multiple_values('pyjslib.map', 'obj');
		}
		if (typeof method == 'undefined') {
			method=__kwargs.method;
			delete __kwargs.method;
		} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.method != 'undefined') {
			pyjs__exception_func_multiple_values('pyjslib.map', 'method');
		}
		if (typeof sequence == 'undefined') {
			sequence=__kwargs.sequence;
			delete __kwargs.sequence;
		} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.sequence != 'undefined') {
			pyjs__exception_func_multiple_values('pyjslib.map', 'sequence');
		}
		if (pyjs_options.arg_kwarg_unexpected_keyword) {
			for (var i in __kwargs) {
				pyjs__exception_func_unexpected_keyword('pyjslib.map', i);
			}
		}
		var __r = [obj, method, sequence];
		for (var pyjs__va_arg = 4;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
			__r.push(arguments[pyjs__va_arg]);
		}

		return __r;
	};
	track.lineno=1511;
	pyjslib.enumerate = function(sequence) {
		if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length);
		track={module:'pyjslib',lineno:1511};trackstack.push(track);
		track.module='pyjslib';
		track.lineno=1511;
		track.lineno=1512;
		var enumeration = new pyjslib.List([]);
		track.lineno=1513;
		var nextIndex = 0;
		track.lineno=1514;
		var pyjs__trackstack_size_1=trackstack.length;
		var __item = sequence.__iter__();
		try {
			while (true) {
				var item = __item.next();
				
				track.lineno=1515;
				enumeration.append(new pyjslib.List([nextIndex, item]));
				track.lineno=1516;
				nextIndex =  ( nextIndex + 1 ) ;
			}
		} catch (e) {
			if (e.__name__ != 'StopIteration') {
				throw e;
			}
		}
		if (trackstack.length > pyjs__trackstack_size_1) {
			trackstack = trackstack.slice(0,pyjs__trackstack_size_1);
			track = trackstack.slice(-1)[0];
		}
		track.module='pyjslib';
		track.lineno=1517;
		track.lineno=1517;
		var pyjs__ret = enumeration;
		trackstack.pop();track=trackstack.pop();trackstack.push(track);
		return pyjs__ret;
	};
	pyjslib.enumerate.__name__ = 'enumerate';

	pyjslib.enumerate.parse_kwargs = function ( __kwargs, sequence ) {
		if (typeof sequence == 'undefined') {
			sequence=__kwargs.sequence;
			delete __kwargs.sequence;
		} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.sequence != 'undefined') {
			pyjs__exception_func_multiple_values('pyjslib.enumerate', 'sequence');
		}
		if (pyjs_options.arg_kwarg_unexpected_keyword) {
			for (var i in __kwargs) {
				pyjs__exception_func_unexpected_keyword('pyjslib.enumerate', i);
			}
		}
		var __r = [sequence];
		for (var pyjs__va_arg = 2;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
			__r.push(arguments[pyjs__va_arg]);
		}

		return __r;
	};
	track.lineno=1520;
	pyjslib.min = function() {
		if (pyjs_options.arg_count && arguments.length < 0) pyjs__exception_func_param(arguments.callee.__name__, 0, null, arguments.length);
		var sequence = pyjslib.Tuple();
		for (var pyjs__va_arg = 0; pyjs__va_arg < arguments.length; pyjs__va_arg++) {
			var pyjs__arg = arguments[pyjs__va_arg];
			sequence.append(pyjs__arg);
		}
		track={module:'pyjslib',lineno:1520};trackstack.push(track);
		track.module='pyjslib';
		track.lineno=1520;
		track.lineno=1521;
		if (pyjslib.bool(pyjslib.eq(pyjslib.len(sequence), 1))) {
			track.lineno=1522;
			sequence = sequence.__getitem__(0);
		}
		track.lineno=1523;
		var minValue = null;
		track.lineno=1524;
		var pyjs__trackstack_size_1=trackstack.length;
		var __item = sequence.__iter__();
		try {
			while (true) {
				var item = __item.next();
				
				track.lineno=1525;
				if (pyjslib.bool((minValue === null))) {
					track.lineno=1526;
					minValue = item;
				}
				else if (pyjslib.bool(pyjslib.eq(pyjslib.cmp(item, minValue), -1))) {
					track.lineno=1528;
					minValue = item;
				}
			}
		} catch (e) {
			if (e.__name__ != 'StopIteration') {
				throw e;
			}
		}
		if (trackstack.length > pyjs__trackstack_size_1) {
			trackstack = trackstack.slice(0,pyjs__trackstack_size_1);
			track = trackstack.slice(-1)[0];
		}
		track.module='pyjslib';
		track.lineno=1529;
		track.lineno=1529;
		var pyjs__ret = minValue;
		trackstack.pop();track=trackstack.pop();trackstack.push(track);
		return pyjs__ret;
	};
	pyjslib.min.__name__ = 'min';

	pyjslib.min.parse_kwargs = function ( __kwargs ) {
		if (pyjs_options.arg_kwarg_unexpected_keyword) {
			for (var i in __kwargs) {
				pyjs__exception_func_unexpected_keyword('pyjslib.min', i);
			}
		}
		var __r = [];
		for (var pyjs__va_arg = 1;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
			__r.push(arguments[pyjs__va_arg]);
		}

		return __r;
	};
	track.lineno=1532;
	pyjslib.max = function() {
		if (pyjs_options.arg_count && arguments.length < 0) pyjs__exception_func_param(arguments.callee.__name__, 0, null, arguments.length);
		var sequence = pyjslib.Tuple();
		for (var pyjs__va_arg = 0; pyjs__va_arg < arguments.length; pyjs__va_arg++) {
			var pyjs__arg = arguments[pyjs__va_arg];
			sequence.append(pyjs__arg);
		}
		track={module:'pyjslib',lineno:1532};trackstack.push(track);
		track.module='pyjslib';
		track.lineno=1532;
		track.lineno=1533;
		if (pyjslib.bool(pyjslib.eq(pyjslib.len(sequence), 1))) {
			track.lineno=1534;
			sequence = sequence.__getitem__(0);
		}
		track.lineno=1535;
		var maxValue = null;
		track.lineno=1536;
		var pyjs__trackstack_size_1=trackstack.length;
		var __item = sequence.__iter__();
		try {
			while (true) {
				var item = __item.next();
				
				track.lineno=1537;
				if (pyjslib.bool((maxValue === null))) {
					track.lineno=1538;
					maxValue = item;
				}
				else if (pyjslib.bool(pyjslib.eq(pyjslib.cmp(item, maxValue), 1))) {
					track.lineno=1540;
					maxValue = item;
				}
			}
		} catch (e) {
			if (e.__name__ != 'StopIteration') {
				throw e;
			}
		}
		if (trackstack.length > pyjs__trackstack_size_1) {
			trackstack = trackstack.slice(0,pyjs__trackstack_size_1);
			track = trackstack.slice(-1)[0];
		}
		track.module='pyjslib';
		track.lineno=1541;
		track.lineno=1541;
		var pyjs__ret = maxValue;
		trackstack.pop();track=trackstack.pop();trackstack.push(track);
		return pyjs__ret;
	};
	pyjslib.max.__name__ = 'max';

	pyjslib.max.parse_kwargs = function ( __kwargs ) {
		if (pyjs_options.arg_kwarg_unexpected_keyword) {
			for (var i in __kwargs) {
				pyjs__exception_func_unexpected_keyword('pyjslib.max', i);
			}
		}
		var __r = [];
		for (var pyjs__va_arg = 1;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
			__r.push(arguments[pyjs__va_arg]);
		}

		return __r;
	};
	track.lineno=1544;
	pyjslib.next_hash_id = 0;
	track.lineno=1547;
	pyjslib.hash = function(obj) {
		if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length);

    if (obj == null) return null;

    if (obj.$H) return obj.$H;
    if (obj.__hash__) return obj.__hash__();
    if (obj.constructor == String)
        return 'str'+obj;
    else if(obj.constructor == Number || obj.constructor == Date)
        return obj;

    obj.$H = ++pyjslib.next_hash_id;
    return obj.$H;
    
	};
	pyjslib.hash.__name__ = 'hash';

	pyjslib.hash.parse_kwargs = function ( __kwargs, obj ) {
		if (typeof obj == 'undefined') {
			obj=__kwargs.obj;
			delete __kwargs.obj;
		} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.obj != 'undefined') {
			pyjs__exception_func_multiple_values('pyjslib.hash', 'obj');
		}
		if (pyjs_options.arg_kwarg_unexpected_keyword) {
			for (var i in __kwargs) {
				pyjs__exception_func_unexpected_keyword('pyjslib.hash', i);
			}
		}
		var __r = [obj];
		for (var pyjs__va_arg = 2;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
			__r.push(arguments[pyjs__va_arg]);
		}

		return __r;
	};
	track.lineno=1562;
	pyjslib.hash = function(obj) {
		if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length);

    if (obj == null) return null;

    if (obj.$H) return obj.$H;
    if (obj.__hash__) return obj.__hash__();
    if (obj.constructor == String || obj.constructor == Number || obj.constructor == Date) return obj;

    obj.$H = ++pyjslib.next_hash_id;
    return obj.$H;
    
	};
	pyjslib.hash.__name__ = 'hash';

	pyjslib.hash.parse_kwargs = function ( __kwargs, obj ) {
		if (typeof obj == 'undefined') {
			obj=__kwargs.obj;
			delete __kwargs.obj;
		} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.obj != 'undefined') {
			pyjs__exception_func_multiple_values('pyjslib.hash', 'obj');
		}
		if (pyjs_options.arg_kwarg_unexpected_keyword) {
			for (var i in __kwargs) {
				pyjs__exception_func_unexpected_keyword('pyjslib.hash', i);
			}
		}
		var __r = [obj];
		for (var pyjs__va_arg = 2;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
			__r.push(arguments[pyjs__va_arg]);
		}

		return __r;
	};
	track.lineno=1576;
	pyjslib.isObject = function(a) {
		if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length);

    return (a != null && (typeof a == 'object')) || pyjslib.isFunction(a);
    
	};
	pyjslib.isObject.__name__ = 'isObject';

	pyjslib.isObject.parse_kwargs = function ( __kwargs, a ) {
		if (typeof a == 'undefined') {
			a=__kwargs.a;
			delete __kwargs.a;
		} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.a != 'undefined') {
			pyjs__exception_func_multiple_values('pyjslib.isObject', 'a');
		}
		if (pyjs_options.arg_kwarg_unexpected_keyword) {
			for (var i in __kwargs) {
				pyjs__exception_func_unexpected_keyword('pyjslib.isObject', i);
			}
		}
		var __r = [a];
		for (var pyjs__va_arg = 2;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
			__r.push(arguments[pyjs__va_arg]);
		}

		return __r;
	};
	track.lineno=1582;
	pyjslib.isFunction = function(a) {
		if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length);

    return typeof a == 'function';
    
	};
	pyjslib.isFunction.__name__ = 'isFunction';

	pyjslib.isFunction.parse_kwargs = function ( __kwargs, a ) {
		if (typeof a == 'undefined') {
			a=__kwargs.a;
			delete __kwargs.a;
		} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.a != 'undefined') {
			pyjs__exception_func_multiple_values('pyjslib.isFunction', 'a');
		}
		if (pyjs_options.arg_kwarg_unexpected_keyword) {
			for (var i in __kwargs) {
				pyjs__exception_func_unexpected_keyword('pyjslib.isFunction', i);
			}
		}
		var __r = [a];
		for (var pyjs__va_arg = 2;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
			__r.push(arguments[pyjs__va_arg]);
		}

		return __r;
	};
	track.lineno=1586;
	pyjslib.callable = pyjslib.isFunction;
	track.lineno=1589;
	pyjslib.isString = function(a) {
		if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length);

    return typeof a == 'string';
    
	};
	pyjslib.isString.__name__ = 'isString';

	pyjslib.isString.parse_kwargs = function ( __kwargs, a ) {
		if (typeof a == 'undefined') {
			a=__kwargs.a;
			delete __kwargs.a;
		} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.a != 'undefined') {
			pyjs__exception_func_multiple_values('pyjslib.isString', 'a');
		}
		if (pyjs_options.arg_kwarg_unexpected_keyword) {
			for (var i in __kwargs) {
				pyjs__exception_func_unexpected_keyword('pyjslib.isString', i);
			}
		}
		var __r = [a];
		for (var pyjs__va_arg = 2;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
			__r.push(arguments[pyjs__va_arg]);
		}

		return __r;
	};
	track.lineno=1595;
	pyjslib.isNull = function(a) {
		if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length);

    return typeof a == 'object' && !a;
    
	};
	pyjslib.isNull.__name__ = 'isNull';

	pyjslib.isNull.parse_kwargs = function ( __kwargs, a ) {
		if (typeof a == 'undefined') {
			a=__kwargs.a;
			delete __kwargs.a;
		} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.a != 'undefined') {
			pyjs__exception_func_multiple_values('pyjslib.isNull', 'a');
		}
		if (pyjs_options.arg_kwarg_unexpected_keyword) {
			for (var i in __kwargs) {
				pyjs__exception_func_unexpected_keyword('pyjslib.isNull', i);
			}
		}
		var __r = [a];
		for (var pyjs__va_arg = 2;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
			__r.push(arguments[pyjs__va_arg]);
		}

		return __r;
	};
	track.lineno=1601;
	pyjslib.isArray = function(a) {
		if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length);

    return pyjslib.isObject(a) && a.constructor == Array;
    
	};
	pyjslib.isArray.__name__ = 'isArray';

	pyjslib.isArray.parse_kwargs = function ( __kwargs, a ) {
		if (typeof a == 'undefined') {
			a=__kwargs.a;
			delete __kwargs.a;
		} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.a != 'undefined') {
			pyjs__exception_func_multiple_values('pyjslib.isArray', 'a');
		}
		if (pyjs_options.arg_kwarg_unexpected_keyword) {
			for (var i in __kwargs) {
				pyjs__exception_func_unexpected_keyword('pyjslib.isArray', i);
			}
		}
		var __r = [a];
		for (var pyjs__va_arg = 2;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
			__r.push(arguments[pyjs__va_arg]);
		}

		return __r;
	};
	track.lineno=1607;
	pyjslib.isUndefined = function(a) {
		if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length);

    return typeof a == 'undefined';
    
	};
	pyjslib.isUndefined.__name__ = 'isUndefined';

	pyjslib.isUndefined.parse_kwargs = function ( __kwargs, a ) {
		if (typeof a == 'undefined') {
			a=__kwargs.a;
			delete __kwargs.a;
		} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.a != 'undefined') {
			pyjs__exception_func_multiple_values('pyjslib.isUndefined', 'a');
		}
		if (pyjs_options.arg_kwarg_unexpected_keyword) {
			for (var i in __kwargs) {
				pyjs__exception_func_unexpected_keyword('pyjslib.isUndefined', i);
			}
		}
		var __r = [a];
		for (var pyjs__va_arg = 2;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
			__r.push(arguments[pyjs__va_arg]);
		}

		return __r;
	};
	track.lineno=1613;
	pyjslib.isIteratable = function(a) {
		if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length);

    return pyjslib.isString(a) || (pyjslib.isObject(a) && a.__iter__);
    
	};
	pyjslib.isIteratable.__name__ = 'isIteratable';

	pyjslib.isIteratable.parse_kwargs = function ( __kwargs, a ) {
		if (typeof a == 'undefined') {
			a=__kwargs.a;
			delete __kwargs.a;
		} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.a != 'undefined') {
			pyjs__exception_func_multiple_values('pyjslib.isIteratable', 'a');
		}
		if (pyjs_options.arg_kwarg_unexpected_keyword) {
			for (var i in __kwargs) {
				pyjs__exception_func_unexpected_keyword('pyjslib.isIteratable', i);
			}
		}
		var __r = [a];
		for (var pyjs__va_arg = 2;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
			__r.push(arguments[pyjs__va_arg]);
		}

		return __r;
	};
	track.lineno=1619;
	pyjslib.isNumber = function(a) {
		if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length);

    return typeof a == 'number' && isFinite(a);
    
	};
	pyjslib.isNumber.__name__ = 'isNumber';

	pyjslib.isNumber.parse_kwargs = function ( __kwargs, a ) {
		if (typeof a == 'undefined') {
			a=__kwargs.a;
			delete __kwargs.a;
		} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.a != 'undefined') {
			pyjs__exception_func_multiple_values('pyjslib.isNumber', 'a');
		}
		if (pyjs_options.arg_kwarg_unexpected_keyword) {
			for (var i in __kwargs) {
				pyjs__exception_func_unexpected_keyword('pyjslib.isNumber', i);
			}
		}
		var __r = [a];
		for (var pyjs__va_arg = 2;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
			__r.push(arguments[pyjs__va_arg]);
		}

		return __r;
	};
	track.lineno=1625;
	pyjslib.toJSObjects = function(x) {
		if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length);
		if (pyjslib.bool(pyjslib.isArray(x))) {

        var result = [];
        for(var k=0; k < x.length; k++) {
           var v = x[k];
           var tv = pyjslib.toJSObjects(v);
           result.push(tv);
        }
        return result;
        
		}
		if (pyjslib.bool(pyjslib.isObject(x))) {
			if (pyjslib.bool(pyjslib.isinstance(x, pyjslib.Dict))) {

            var o = x.getObject();
            var result = {};
            for (var i in o) {
               result[o[i][0].toString()] = o[i][1];
            }
            return pyjslib.toJSObjects(result)
            
			}
			else if (pyjslib.bool(pyjslib.isinstance(x, pyjslib.List))) {
				return pyjslib.toJSObjects((x.l===undefined?(function(){throw new TypeError('x.l is undefined')})():(typeof x.l == 'function' && x.__is_instance__?pyjslib.getattr(x, 'l'):x.l)));
			}
			else if (pyjslib.bool(pyjslib.hasattr(x, String('__class__')))) {
				return x;
			}
		}
		if (pyjslib.bool(pyjslib.isObject(x))) {

        var result = {};
        for(var k in x) {
            var v = x[k];
            var tv = pyjslib.toJSObjects(v)
            result[k] = tv;
            }
            return result;
         
		}
		return x;
	};
	pyjslib.toJSObjects.__name__ = 'toJSObjects';

	pyjslib.toJSObjects.parse_kwargs = function ( __kwargs, x ) {
		if (typeof x == 'undefined') {
			x=__kwargs.x;
			delete __kwargs.x;
		} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.x != 'undefined') {
			pyjs__exception_func_multiple_values('pyjslib.toJSObjects', 'x');
		}
		if (pyjs_options.arg_kwarg_unexpected_keyword) {
			for (var i in __kwargs) {
				pyjs__exception_func_unexpected_keyword('pyjslib.toJSObjects', i);
			}
		}
		var __r = [x];
		for (var pyjs__va_arg = 2;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
			__r.push(arguments[pyjs__va_arg]);
		}

		return __r;
	};
	track.lineno=1669;
	pyjslib.sprintf = function(strng, args) {
		if (pyjs_options.arg_count && arguments.length != 2) pyjs__exception_func_param(arguments.callee.__name__, 2, 2, arguments.length);
		var constructor = pyjslib.get_pyjs_classtype(args);

    var re_dict = /([^%]*)%[(]([^)]+)[)]([#0  x2B-]*)(\d+)?(\.\d+)?[hlL]?(.)((.|\n)*)/;
    var re_list = /([^%]*)%([#0 +-]*)(\*|(\d+))?(\.\d+)?[hlL]?(.)((.|\n)*)/;
    var re_exp = /(.*)([+-])(.*)/;

		var strlen = pyjslib.len(strng);
		var argidx = 0;
		var nargs = 0;
		var result = new pyjslib.List([]);
		var remainder = strng;
		next_arg = function() {
			if (pyjs_options.arg_count && arguments.length != 0) pyjs__exception_func_param(arguments.callee.__name__, 0, 0, arguments.length);
			if (pyjslib.bool(pyjslib.eq(argidx, nargs))) {
				throw (pyjslib.TypeError(String('not enough arguments for format string')));
			}
			var arg = args.__getitem__(argidx);
			argidx += 1;
			return arg;
		};
		next_arg.__name__ = 'next_arg';

		next_arg.parse_kwargs = function ( __kwargs ) {
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('next_arg', i);
				}
			}
			var __r = [];
			for (var pyjs__va_arg = 1;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		};
		formatarg = function(flags, minlen, precision, conversion, param) {
			if (pyjs_options.arg_count && arguments.length != 5) pyjs__exception_func_param(arguments.callee.__name__, 5, 5, arguments.length);
			var subst = String('');
			var numeric = true;
			if (pyjslib.bool(!(minlen))) {
				minlen = 0;
			}
			else {
				minlen = pyjslib.int(minlen);
			}
			if (pyjslib.bool(!(precision))) {
				precision = null;
			}
			else {
				precision = pyjslib.int(precision);
			}
			var left_padding = 1;
			if (pyjslib.bool((pyjslib.cmp(flags.find(String('-')), 0) != -1))) {
				left_padding = 0;
			}
			if (pyjslib.bool(pyjslib.eq(conversion, String('%')))) {
				numeric = false;
				subst = String('%');
			}
			else if (pyjslib.bool(pyjslib.eq(conversion, String('c')))) {
				numeric = false;
				subst = pyjslib.chr(pyjslib.int(param));
			}
			else if (pyjslib.bool((pyjslib.eq(conversion, String('d'))) || (pyjslib.eq(conversion, String('i'))) || (pyjslib.eq(conversion, String('u'))))) {
				subst = pyjslib.str(pyjslib.int(param));
			}
			else if (pyjslib.bool(pyjslib.eq(conversion, String('e')))) {
				if (pyjslib.bool((precision === null))) {
					precision = 6;
				}

                subst = re_exp.exec(String(param.toExponential(precision)));
                if (subst[3].length == 1) {
        	    subst = subst[1] + subst[2] + '0' + subst[3];
		} else {
        	    subst = subst[1] + subst[2] + subst[3];
		}
			}
			else if (pyjslib.bool(pyjslib.eq(conversion, String('E')))) {
				if (pyjslib.bool((precision === null))) {
					precision = 6;
				}

                subst = re_exp.exec(String(param.toExponential(precision)).toUpperCase());
                if (subst[3].length == 1) {
        	    subst = subst[1] + subst[2] + '0' + subst[3];
		} else {
        	    subst = subst[1] + subst[2] + subst[3];
		}
			}
			else if (pyjslib.bool(pyjslib.eq(conversion, String('f')))) {
				if (pyjslib.bool((precision === null))) {
					precision = 6;
				}

                subst = String(parseFloat(param).toFixed(precision));
			}
			else if (pyjslib.bool(pyjslib.eq(conversion, String('F')))) {
				if (pyjslib.bool((precision === null))) {
					precision = 6;
				}

                subst = String(parseFloat(param).toFixed(precision)).toUpperCase();
			}
			else if (pyjslib.bool(pyjslib.eq(conversion, String('g')))) {
				if (pyjslib.bool((pyjslib.cmp(flags.find(String('#')), 0) != -1))) {
					if (pyjslib.bool((precision === null))) {
						precision = 6;
					}
				}
				if (pyjslib.bool(((pyjslib.cmp(param, 1000000.0) != -1)) || ((pyjslib.cmp(param, 1e-05) == -1)))) {

                    subst = String(precision == null ? param.toExponential() : param.toExponential().toPrecision(precision));
				}
				else {

                    subst = String(precision == null ? parseFloat(param) : parseFloat(param).toPrecision(precision));
				}
			}
			else if (pyjslib.bool(pyjslib.eq(conversion, String('G')))) {
				if (pyjslib.bool((pyjslib.cmp(flags.find(String('#')), 0) != -1))) {
					if (pyjslib.bool((precision === null))) {
						precision = 6;
					}
				}
				if (pyjslib.bool(((pyjslib.cmp(param, 1000000.0) != -1)) || ((pyjslib.cmp(param, 1e-05) == -1)))) {

                    subst = String(precision == null ? param.toExponential() : param.toExponential().toPrecision(precision)).toUpperCase();
				}
				else {

                    subst = String(precision == null ? parseFloat(param) : parseFloat(param).toPrecision(precision)).toUpperCase().toUpperCase();
				}
			}
			else if (pyjslib.bool(pyjslib.eq(conversion, String('r')))) {
				numeric = false;
				subst = pyjslib.repr(param);
			}
			else if (pyjslib.bool(pyjslib.eq(conversion, String('s')))) {
				numeric = false;
				subst = pyjslib.str(param);
			}
			else if (pyjslib.bool(pyjslib.eq(conversion, String('o')))) {
				param = pyjslib.int(param);

                subst = param.toString(8);
				if (pyjslib.bool(((pyjslib.cmp(flags.find(String('#')), 0) != -1)) && ((subst != String('0'))))) {
					subst =  ( String('0') + subst ) ;
				}
			}
			else if (pyjslib.bool(pyjslib.eq(conversion, String('x')))) {
				param = pyjslib.int(param);

                subst = param.toString(16);
				if (pyjslib.bool((pyjslib.cmp(flags.find(String('#')), 0) != -1))) {
					if (pyjslib.bool(left_padding)) {
						subst = subst.rjust( ( minlen - 2 ) , String('0'));
					}
					subst =  ( String('0x') + subst ) ;
				}
			}
			else if (pyjslib.bool(pyjslib.eq(conversion, String('X')))) {
				param = pyjslib.int(param);

                subst = param.toString(16).toUpperCase();
				if (pyjslib.bool((pyjslib.cmp(flags.find(String('#')), 0) != -1))) {
					if (pyjslib.bool(left_padding)) {
						subst = subst.rjust( ( minlen - 2 ) , String('0'));
					}
					subst =  ( String('0X') + subst ) ;
				}
			}
			else {
				throw (pyjslib.ValueError( (  (  (  (  ( String('unsupported format character \x27') + conversion )  + String('\x27 (') )  + pyjslib.hex(pyjslib.ord(conversion)) )  + String(') at index ') )  +  (  ( strlen - pyjslib.len(remainder) )  - 1 )  ) ));
			}
			if (pyjslib.bool((minlen) && ((pyjslib.cmp(pyjslib.len(subst), minlen) == -1)))) {
				var padchar = String(' ');
				if (pyjslib.bool((numeric) && (left_padding) && ((pyjslib.cmp(flags.find(String('0')), 0) != -1)))) {
					padchar = String('0');
				}
				if (pyjslib.bool(left_padding)) {
					subst = subst.rjust(minlen, padchar);
				}
				else {
					subst = subst.ljust(minlen, padchar);
				}
			}
			return subst;
		};
		formatarg.__name__ = 'formatarg';

		formatarg.parse_kwargs = function ( __kwargs, flags, minlen, precision, conversion, param ) {
			if (typeof flags == 'undefined') {
				flags=__kwargs.flags;
				delete __kwargs.flags;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.flags != 'undefined') {
				pyjs__exception_func_multiple_values('formatarg', 'flags');
			}
			if (typeof minlen == 'undefined') {
				minlen=__kwargs.minlen;
				delete __kwargs.minlen;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.minlen != 'undefined') {
				pyjs__exception_func_multiple_values('formatarg', 'minlen');
			}
			if (typeof precision == 'undefined') {
				precision=__kwargs.precision;
				delete __kwargs.precision;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.precision != 'undefined') {
				pyjs__exception_func_multiple_values('formatarg', 'precision');
			}
			if (typeof conversion == 'undefined') {
				conversion=__kwargs.conversion;
				delete __kwargs.conversion;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.conversion != 'undefined') {
				pyjs__exception_func_multiple_values('formatarg', 'conversion');
			}
			if (typeof param == 'undefined') {
				param=__kwargs.param;
				delete __kwargs.param;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.param != 'undefined') {
				pyjs__exception_func_multiple_values('formatarg', 'param');
			}
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('formatarg', i);
				}
			}
			var __r = [flags, minlen, precision, conversion, param];
			for (var pyjs__va_arg = 6;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		};
		sprintf_list = function(strng, args) {
			if (pyjs_options.arg_count && arguments.length != 2) pyjs__exception_func_param(arguments.callee.__name__, 2, 2, arguments.length);
    while (pyjslib.bool(remainder)) {

            var a = re_list.exec(remainder);
			if (pyjslib.bool((a === null))) {
				result.append(remainder);
				break;
			}

            var left = a[1], flags = a[2];
            var minlen = a[3], precision = a[5], conversion = a[6];
            remainder = a[7];
            if (typeof minlen == 'undefined') minlen = null;
            if (typeof precision == 'undefined') precision = null;
            if (typeof conversion == 'undefined') conversion = null;

			result.append(left);
			if (pyjslib.bool(pyjslib.eq(minlen, String('*')))) {
				var minlen = next_arg();
var minlen_type = typeof(minlen);
				if (pyjslib.bool(((minlen_type != String('number'))) || ((pyjslib.int(minlen) != minlen)))) {
					throw (pyjslib.TypeError(String('* wants int')));
				}
			}
			if (pyjslib.bool((conversion != String('%')))) {
				var param = next_arg();
			}
			result.append(formatarg(flags, minlen, precision, conversion, param));
    }
			return null;
		};
		sprintf_list.__name__ = 'sprintf_list';

		sprintf_list.parse_kwargs = function ( __kwargs, strng, args ) {
			if (typeof strng == 'undefined') {
				strng=__kwargs.strng;
				delete __kwargs.strng;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.strng != 'undefined') {
				pyjs__exception_func_multiple_values('sprintf_list', 'strng');
			}
			if (typeof args == 'undefined') {
				args=__kwargs.args;
				delete __kwargs.args;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.args != 'undefined') {
				pyjs__exception_func_multiple_values('sprintf_list', 'args');
			}
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('sprintf_list', i);
				}
			}
			var __r = [strng, args];
			for (var pyjs__va_arg = 3;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		};
		sprintf_dict = function(strng, args) {
			if (pyjs_options.arg_count && arguments.length != 2) pyjs__exception_func_param(arguments.callee.__name__, 2, 2, arguments.length);
			var arg = args;
			argidx += 1;
    while (pyjslib.bool(remainder)) {

            var a = re_dict.exec(remainder);
			if (pyjslib.bool((a === null))) {
				result.append(remainder);
				break;
			}

            var left = a[1], key = a[2], flags = a[3];
            var minlen = a[4], precision = a[5], conversion = a[6];
            remainder = a[7];
            if (typeof minlen == 'undefined') minlen = null;
            if (typeof precision == 'undefined') precision = null;
            if (typeof conversion == 'undefined') conversion = null;

			result.append(left);
			if (pyjslib.bool(!(arg.has_key(key)))) {
				throw (pyjslib.KeyError(key));
			}
			else {
				var param = arg.__getitem__(key);
			}
			result.append(formatarg(flags, minlen, precision, conversion, param));
    }
			return null;
		};
		sprintf_dict.__name__ = 'sprintf_dict';

		sprintf_dict.parse_kwargs = function ( __kwargs, strng, args ) {
			if (typeof strng == 'undefined') {
				strng=__kwargs.strng;
				delete __kwargs.strng;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.strng != 'undefined') {
				pyjs__exception_func_multiple_values('sprintf_dict', 'strng');
			}
			if (typeof args == 'undefined') {
				args=__kwargs.args;
				delete __kwargs.args;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.args != 'undefined') {
				pyjs__exception_func_multiple_values('sprintf_dict', 'args');
			}
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('sprintf_dict', i);
				}
			}
			var __r = [strng, args];
			for (var pyjs__va_arg = 3;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		};

    var a = re_dict.exec(strng);

		if (pyjslib.bool((a === null))) {
			if (pyjslib.bool((constructor != String('Tuple')))) {
				args = new pyjslib.Tuple([args]);
			}
			nargs = pyjslib.len(args);
			sprintf_list(strng, args);
			if (pyjslib.bool((argidx != nargs))) {
				throw (pyjslib.TypeError(String('not all arguments converted during string formatting')));
			}
		}
		else {
			if (pyjslib.bool((constructor != String('Dict')))) {
				throw (pyjslib.TypeError(String('format requires a mapping')));
			}
			sprintf_dict(strng, args);
		}
		return String('').join(result);
	};
	pyjslib.sprintf.__name__ = 'sprintf';

	pyjslib.sprintf.parse_kwargs = function ( __kwargs, strng, args ) {
		if (typeof strng == 'undefined') {
			strng=__kwargs.strng;
			delete __kwargs.strng;
		} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.strng != 'undefined') {
			pyjs__exception_func_multiple_values('pyjslib.sprintf', 'strng');
		}
		if (typeof args == 'undefined') {
			args=__kwargs.args;
			delete __kwargs.args;
		} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.args != 'undefined') {
			pyjs__exception_func_multiple_values('pyjslib.sprintf', 'args');
		}
		if (pyjs_options.arg_kwarg_unexpected_keyword) {
			for (var i in __kwargs) {
				pyjs__exception_func_unexpected_keyword('pyjslib.sprintf', i);
			}
		}
		var __r = [strng, args];
		for (var pyjs__va_arg = 3;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
			__r.push(arguments[pyjs__va_arg]);
		}

		return __r;
	};
	track.lineno=1869;
	pyjslib.printFunc = function(objs, newline) {
		if (pyjs_options.arg_count && arguments.length != 2) pyjs__exception_func_param(arguments.callee.__name__, 2, 2, arguments.length);

    console.log(objs);
    
	};
	pyjslib.printFunc.__name__ = 'printFunc';

	pyjslib.printFunc.parse_kwargs = function ( __kwargs, objs, newline ) {
		if (typeof objs == 'undefined') {
			objs=__kwargs.objs;
			delete __kwargs.objs;
		} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.objs != 'undefined') {
			pyjs__exception_func_multiple_values('pyjslib.printFunc', 'objs');
		}
		if (typeof newline == 'undefined') {
			newline=__kwargs.newline;
			delete __kwargs.newline;
		} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.newline != 'undefined') {
			pyjs__exception_func_multiple_values('pyjslib.printFunc', 'newline');
		}
		if (pyjs_options.arg_kwarg_unexpected_keyword) {
			for (var i in __kwargs) {
				pyjs__exception_func_unexpected_keyword('pyjslib.printFunc', i);
			}
		}
		var __r = [objs, newline];
		for (var pyjs__va_arg = 3;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
			__r.push(arguments[pyjs__va_arg]);
		}

		return __r;
	};
	track.lineno=1881;
	pyjslib.type = function(clsname, bases, methods) {
		if (pyjs_options.arg_count && (arguments.length < 1 || arguments.length > 3)) pyjs__exception_func_param(arguments.callee.__name__, 1, 3, arguments.length);
		if (typeof bases == 'undefined') bases=null;
		if (typeof methods == 'undefined') methods=null;
 var mths = {}; 
		if (pyjslib.bool(methods)) {
			var __k = methods.keys().__iter__();
			try {
				while (true) {
					var k = __k.next();
					
					var mth = methods.__getitem__(k);
 mths[k] = mth; 
				}
			} catch (e) {
				if (e.__name__ != 'StopIteration') {
					throw e;
				}
			}
		}
 var bss = null; 
		if (pyjslib.bool(bases)) {
bss = bases.l;
		}
 return pyjs_type(clsname, bss, mths); 
	};
	pyjslib.type.__name__ = 'type';

	pyjslib.type.parse_kwargs = function ( __kwargs, clsname, bases, methods ) {
		if (typeof clsname == 'undefined') {
			clsname=__kwargs.clsname;
			delete __kwargs.clsname;
		} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.clsname != 'undefined') {
			pyjs__exception_func_multiple_values('pyjslib.type', 'clsname');
		}
		if (typeof bases == 'undefined') {
			bases=__kwargs.bases;
			delete __kwargs.bases;
		} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.bases != 'undefined') {
			pyjs__exception_func_multiple_values('pyjslib.type', 'bases');
		}
		if (typeof methods == 'undefined') {
			methods=__kwargs.methods;
			delete __kwargs.methods;
		} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.methods != 'undefined') {
			pyjs__exception_func_multiple_values('pyjslib.type', 'methods');
		}
		if (pyjs_options.arg_kwarg_unexpected_keyword) {
			for (var i in __kwargs) {
				pyjs__exception_func_unexpected_keyword('pyjslib.type', i);
			}
		}
		var __r = [clsname, bases, methods];
		for (var pyjs__va_arg = 4;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
			__r.push(arguments[pyjs__va_arg]);
		}

		return __r;
	};
	track.lineno=1896;
	pyjslib.pow = function(x, y, z) {
		if (pyjs_options.arg_count && (arguments.length < 2 || arguments.length > 3)) pyjs__exception_func_param(arguments.callee.__name__, 2, 3, arguments.length);
		if (typeof z == 'undefined') z=null;
		track={module:'pyjslib',lineno:1896};trackstack.push(track);
		track.module='pyjslib';
		track.lineno=1896;
		track.lineno=1897;
p = Math.pow(x, y);
		track.lineno=1898;
		if (pyjslib.bool((z === null))) {
			track.lineno=1899;
			track.lineno=1899;
			var pyjs__ret = pyjslib.float(p);
			trackstack.pop();track=trackstack.pop();trackstack.push(track);
			return pyjs__ret;
		}
		track.lineno=1900;
		track.lineno=1900;
		var pyjs__ret = pyjslib.float(p % z);
		trackstack.pop();track=trackstack.pop();trackstack.push(track);
		return pyjs__ret;
	};
	pyjslib.pow.__name__ = 'pow';

	pyjslib.pow.parse_kwargs = function ( __kwargs, x, y, z ) {
		if (typeof x == 'undefined') {
			x=__kwargs.x;
			delete __kwargs.x;
		} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.x != 'undefined') {
			pyjs__exception_func_multiple_values('pyjslib.pow', 'x');
		}
		if (typeof y == 'undefined') {
			y=__kwargs.y;
			delete __kwargs.y;
		} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.y != 'undefined') {
			pyjs__exception_func_multiple_values('pyjslib.pow', 'y');
		}
		if (typeof z == 'undefined') {
			z=__kwargs.z;
			delete __kwargs.z;
		} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.z != 'undefined') {
			pyjs__exception_func_multiple_values('pyjslib.pow', 'z');
		}
		if (pyjs_options.arg_kwarg_unexpected_keyword) {
			for (var i in __kwargs) {
				pyjs__exception_func_unexpected_keyword('pyjslib.pow', i);
			}
		}
		var __r = [x, y, z];
		for (var pyjs__va_arg = 4;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
			__r.push(arguments[pyjs__va_arg]);
		}

		return __r;
	};
	track.lineno=1902;
	pyjslib.hex = function(x) {
		if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length);
		track={module:'pyjslib',lineno:1902};trackstack.push(track);
		track.module='pyjslib';
		track.lineno=1902;
		track.lineno=1903;
		if (pyjslib.bool((pyjslib.int(x) != x))) {
			track.lineno=1904;
			throw (pyjslib.TypeError(String('hex() argument can\x27t be converted to hex')));
		}
		track.lineno=1905;
r = '0x'+x.toString(16);
		track.lineno=1906;
		track.lineno=1906;
		var pyjs__ret = pyjslib.str(r);
		trackstack.pop();track=trackstack.pop();trackstack.push(track);
		return pyjs__ret;
	};
	pyjslib.hex.__name__ = 'hex';

	pyjslib.hex.parse_kwargs = function ( __kwargs, x ) {
		if (typeof x == 'undefined') {
			x=__kwargs.x;
			delete __kwargs.x;
		} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.x != 'undefined') {
			pyjs__exception_func_multiple_values('pyjslib.hex', 'x');
		}
		if (pyjs_options.arg_kwarg_unexpected_keyword) {
			for (var i in __kwargs) {
				pyjs__exception_func_unexpected_keyword('pyjslib.hex', i);
			}
		}
		var __r = [x];
		for (var pyjs__va_arg = 2;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
			__r.push(arguments[pyjs__va_arg]);
		}

		return __r;
	};
	track.lineno=1908;
	pyjslib.oct = function(x) {
		if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length);
		track={module:'pyjslib',lineno:1908};trackstack.push(track);
		track.module='pyjslib';
		track.lineno=1908;
		track.lineno=1909;
		if (pyjslib.bool((pyjslib.int(x) != x))) {
			track.lineno=1910;
			throw (pyjslib.TypeError(String('oct() argument can\x27t be converted to oct')));
		}
		track.lineno=1911;
r = '0'+x.toString(8);
		track.lineno=1912;
		track.lineno=1912;
		var pyjs__ret = pyjslib.str(r);
		trackstack.pop();track=trackstack.pop();trackstack.push(track);
		return pyjs__ret;
	};
	pyjslib.oct.__name__ = 'oct';

	pyjslib.oct.parse_kwargs = function ( __kwargs, x ) {
		if (typeof x == 'undefined') {
			x=__kwargs.x;
			delete __kwargs.x;
		} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.x != 'undefined') {
			pyjs__exception_func_multiple_values('pyjslib.oct', 'x');
		}
		if (pyjs_options.arg_kwarg_unexpected_keyword) {
			for (var i in __kwargs) {
				pyjs__exception_func_unexpected_keyword('pyjslib.oct', i);
			}
		}
		var __r = [x];
		for (var pyjs__va_arg = 2;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
			__r.push(arguments[pyjs__va_arg]);
		}

		return __r;
	};
	track.lineno=1914;
	pyjslib.round = function(x, n) {
		if (pyjs_options.arg_count && (arguments.length < 1 || arguments.length > 2)) pyjs__exception_func_param(arguments.callee.__name__, 1, 2, arguments.length);
		if (typeof n == 'undefined') n=0;
		track={module:'pyjslib',lineno:1914};trackstack.push(track);
		track.module='pyjslib';
		track.lineno=1914;
		track.lineno=1915;
		n = pyjslib.pow(10, n);
		track.lineno=1916;
r = Math.round(n*x)/n;
		track.lineno=1917;
		track.lineno=1917;
		var pyjs__ret = pyjslib.float(r);
		trackstack.pop();track=trackstack.pop();trackstack.push(track);
		return pyjs__ret;
	};
	pyjslib.round.__name__ = 'round';

	pyjslib.round.parse_kwargs = function ( __kwargs, x, n ) {
		if (typeof x == 'undefined') {
			x=__kwargs.x;
			delete __kwargs.x;
		} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.x != 'undefined') {
			pyjs__exception_func_multiple_values('pyjslib.round', 'x');
		}
		if (typeof n == 'undefined') {
			n=__kwargs.n;
			delete __kwargs.n;
		} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.n != 'undefined') {
			pyjs__exception_func_multiple_values('pyjslib.round', 'n');
		}
		if (pyjs_options.arg_kwarg_unexpected_keyword) {
			for (var i in __kwargs) {
				pyjs__exception_func_unexpected_keyword('pyjslib.round', i);
			}
		}
		var __r = [x, n];
		for (var pyjs__va_arg = 3;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
			__r.push(arguments[pyjs__va_arg]);
		}

		return __r;
	};
	track.lineno=1919;
	pyjslib.divmod = function(x, y) {
		if (pyjs_options.arg_count && arguments.length != 2) pyjs__exception_func_param(arguments.callee.__name__, 2, 2, arguments.length);
		track={module:'pyjslib',lineno:1919};trackstack.push(track);
		track.module='pyjslib';
		track.lineno=1919;
		track.lineno=1920;
		if (pyjslib.bool((pyjslib.eq(pyjslib.int(x), x)) && (pyjslib.eq(pyjslib.int(y), y)))) {
			track.lineno=1921;
			track.lineno=1921;
			var pyjs__ret = new pyjslib.Tuple([pyjslib.int( ( x / y ) ), pyjslib.int(x % y)]);
			trackstack.pop();track=trackstack.pop();trackstack.push(track);
			return pyjs__ret;
		}
		track.lineno=1922;
f = Math.floor(x / y);
		track.lineno=1923;
		var f = pyjslib.float(f);
		track.lineno=1924;
		track.lineno=1924;
		var pyjs__ret = new pyjslib.Tuple([f,  ( x -  ( f * y )  ) ]);
		trackstack.pop();track=trackstack.pop();trackstack.push(track);
		return pyjs__ret;
	};
	pyjslib.divmod.__name__ = 'divmod';

	pyjslib.divmod.parse_kwargs = function ( __kwargs, x, y ) {
		if (typeof x == 'undefined') {
			x=__kwargs.x;
			delete __kwargs.x;
		} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.x != 'undefined') {
			pyjs__exception_func_multiple_values('pyjslib.divmod', 'x');
		}
		if (typeof y == 'undefined') {
			y=__kwargs.y;
			delete __kwargs.y;
		} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.y != 'undefined') {
			pyjs__exception_func_multiple_values('pyjslib.divmod', 'y');
		}
		if (pyjs_options.arg_kwarg_unexpected_keyword) {
			for (var i in __kwargs) {
				pyjs__exception_func_unexpected_keyword('pyjslib.divmod', i);
			}
		}
		var __r = [x, y];
		for (var pyjs__va_arg = 3;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
			__r.push(arguments[pyjs__va_arg]);
		}

		return __r;
	};
	track.lineno=1926;
	pyjslib.all = function(iterable) {
		if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length);
		track={module:'pyjslib',lineno:1926};trackstack.push(track);
		track.module='pyjslib';
		track.lineno=1926;
		track.lineno=1927;
		var pyjs__trackstack_size_1=trackstack.length;
		var __element = iterable.__iter__();
		try {
			while (true) {
				var element = __element.next();
				
				track.lineno=1928;
				if (pyjslib.bool(!(element))) {
					track.lineno=1929;
					track.lineno=1929;
					var pyjs__ret = false;
					trackstack.pop();track=trackstack.pop();trackstack.push(track);
					return pyjs__ret;
				}
			}
		} catch (e) {
			if (e.__name__ != 'StopIteration') {
				throw e;
			}
		}
		if (trackstack.length > pyjs__trackstack_size_1) {
			trackstack = trackstack.slice(0,pyjs__trackstack_size_1);
			track = trackstack.slice(-1)[0];
		}
		track.module='pyjslib';
		track.lineno=1930;
		track.lineno=1930;
		var pyjs__ret = true;
		trackstack.pop();track=trackstack.pop();trackstack.push(track);
		return pyjs__ret;
	};
	pyjslib.all.__name__ = 'all';

	pyjslib.all.parse_kwargs = function ( __kwargs, iterable ) {
		if (typeof iterable == 'undefined') {
			iterable=__kwargs.iterable;
			delete __kwargs.iterable;
		} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.iterable != 'undefined') {
			pyjs__exception_func_multiple_values('pyjslib.all', 'iterable');
		}
		if (pyjs_options.arg_kwarg_unexpected_keyword) {
			for (var i in __kwargs) {
				pyjs__exception_func_unexpected_keyword('pyjslib.all', i);
			}
		}
		var __r = [iterable];
		for (var pyjs__va_arg = 2;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
			__r.push(arguments[pyjs__va_arg]);
		}

		return __r;
	};
	track.lineno=1932;
	pyjslib.any = function(iterable) {
		if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length);
		track={module:'pyjslib',lineno:1932};trackstack.push(track);
		track.module='pyjslib';
		track.lineno=1932;
		track.lineno=1933;
		var pyjs__trackstack_size_1=trackstack.length;
		var __element = iterable.__iter__();
		try {
			while (true) {
				var element = __element.next();
				
				track.lineno=1934;
				if (pyjslib.bool(element)) {
					track.lineno=1935;
					track.lineno=1935;
					var pyjs__ret = true;
					trackstack.pop();track=trackstack.pop();trackstack.push(track);
					return pyjs__ret;
				}
			}
		} catch (e) {
			if (e.__name__ != 'StopIteration') {
				throw e;
			}
		}
		if (trackstack.length > pyjs__trackstack_size_1) {
			trackstack = trackstack.slice(0,pyjs__trackstack_size_1);
			track = trackstack.slice(-1)[0];
		}
		track.module='pyjslib';
		track.lineno=1936;
		track.lineno=1936;
		var pyjs__ret = false;
		trackstack.pop();track=trackstack.pop();trackstack.push(track);
		return pyjs__ret;
	};
	pyjslib.any.__name__ = 'any';

	pyjslib.any.parse_kwargs = function ( __kwargs, iterable ) {
		if (typeof iterable == 'undefined') {
			iterable=__kwargs.iterable;
			delete __kwargs.iterable;
		} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.iterable != 'undefined') {
			pyjs__exception_func_multiple_values('pyjslib.any', 'iterable');
		}
		if (pyjs_options.arg_kwarg_unexpected_keyword) {
			for (var i in __kwargs) {
				pyjs__exception_func_unexpected_keyword('pyjslib.any', i);
			}
		}
		var __r = [iterable];
		for (var pyjs__va_arg = 2;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
			__r.push(arguments[pyjs__va_arg]);
		}

		return __r;
	};

return this;
}; /* end pyjslib */ 


/* initialize static library */
pyjslib();


//
// END LIB pyjslib
//


//
// BEGIN JS _pyjs.js
//


function pyjs_args_merge(func, star_args, dstar_args, args)
{
    var call_args;

    if (star_args) {
        if (!pyjslib.isIteratable(star_args)) {
            throw (pyjslib.TypeError(func.__name__ + "() arguments after * must be a sequence" + pyjslib.repr(star_args)));
        }
        if (star_args.l != null && star_args.l.constructor == Array) {
            call_args = args.concat(star_args.l);
        } else {
            call_args = Array();
            var __i = star_args.__iter__();
            var i = 0;
            try {
                while (true) {
                    call_args[i]=__i.next();
                    i++;
                }
            } catch (e) {
                if (e != pyjslib.StopIteration) {
                    throw e;
                }
            }
            call_args = args.concat(call_args);
        }
    }
    else
    {
        call_args = args;
    }
    if (dstar_args) {
        if (pyjslib.get_pyjs_classtype(dstar_args) != 'Dict') {
            throw (pyjslib.TypeError(func.__name__ + "() arguments after ** must be a dictionary " + pyjslib.repr(dstar_args)));
        }
        var __i = dstar_args.__iter__();
        try {
            while (true) {
                var i = __i.next();
                if (pyjs_options.arg_kwarg_multiple_values && typeof call_args[0][i] != 'undefined') {
                    pyjs__exception_func_multiple_values(func.__name__, i);
                }
                call_args[0][i] = dstar_args.__getitem__(i)
            }
        } catch (e) {
            if (e != pyjslib.StopIteration) {
                throw e;
            }
        }

    }
    return call_args;
}

function pyjs_kwargs_function_call(func, star_args, dstar_args, args)
{
    args = pyjs_args_merge(func, star_args, dstar_args, args);
    if (func.parse_kwargs) {
        args = func.parse_kwargs.apply(null, args);
    } else if (pyjs_options.arg_kwarg_unexpected_keyword && args.length > 0) {
        for (var i in args[0]) {
            pyjs__exception_func_unexpected_keyword(func.__name__, i);
        }
    }
    return func.apply(null, args);
}

function pyjs_kwargs_method_call(obj, method_name, star_args, dstar_args, args)
{
    var method = obj[method_name];
    args = pyjs_args_merge(method, star_args, dstar_args, args);
    if (method.parse_kwargs)
    {
        args = method.parse_kwargs.apply(null, args);
    } else if (pyjs_options.arg_kwarg_unexpected_keyword && args.length > 0) {
        for (var i in args[0]) {
            pyjs__exception_func_unexpected_keyword(method.__name__, i);
        }
    }
    return method.apply(obj, args);
}

function pyjs__exception_func_param(func_name, minargs, maxargs, nargs) {
    if (minargs == maxargs) {
        switch (minargs) {
            case 0:
                var msg = func_name + "() takes no arguments (" + nargs + " given)";
                break;
            case 1:
                msg = func_name + "() takes exactly " + minargs + " argument (" + nargs + " given)";
                break;
            default:
                msg = func_name + "() takes exactly " + minargs + " arguments (" + nargs + " given)";
        };
    } else if (nargs > maxargs) {
        if (maxargs == 1) {
            msg  = func_name + "() takes at most " + maxargs + " argument (" + nargs + " given)";
        } else {
            msg = func_name + "() takes at most " + maxargs + " arguments (" + nargs + " given)";
        }
    } else if (nargs < minargs) {
        if (minargs == 1) {
            msg = func_name + "() takes at least " + minargs + " argument (" + nargs + " given)";
        } else {
            msg = func_name + "() takes at least " + minargs + " arguments (" + nargs + " given)";
        }
    } else {
        return;
    }
    //throw msg
    throw pyjslib.TypeError(String(msg));
}

function pyjs__exception_func_multiple_values(func_name, key) {
    //throw func_name + "() got multiple values for keyword argument '" + key + "'";
    throw pyjslib.TypeError(String(func_name + "() got multiple values for keyword argument '" + key + "'"));
}

function pyjs__exception_func_unexpected_keyword(func_name, key) {
    //throw func_name + "() got an unexpected keyword argument '" + key + "'";
    throw pyjslib.TypeError(String(func_name + "() got an unexpected keyword argument '" + key + "'"));
}

function pyjs__exception_func_class_expected(func_name, class_name, instance) {
        if (typeof instance == 'undefined') {
            instance = 'nothing';
        } else if (instance.__is_instance__ == null) {
            instance = "'"+String(instance)+"'";
        } else {
            instance = String(instance);
        }
        //throw "unbound method "+func_name+"() must be called with "+class_name+" class as first argument (got "+instance+" instead)";
        throw pyjslib.TypeError(String("unbound method "+func_name+"() must be called with "+class_name+" class as first argument (got "+instance+" instead)"));
}

function pyjs__exception_func_instance_expected(func_name, class_name, instance) {
        if (typeof instance == 'undefined') {
            instance = 'nothing';
        } else if (instance.__is_instance__ == null) {
            instance = "'"+String(instance)+"'";
        } else {
            instance = String(instance);
        }
        //throw "unbound method "+func_name+"() must be called with "+class_name+" instance as first argument (got "+instance+" instead)";
        throw pyjslib.TypeError(String("unbound method "+func_name+"() must be called with "+class_name+" instance as first argument (got "+instance+" instead)"));
}

function pyjs__bind_method(klass, func_name, func, parse_kwargs) {
    func.__name__ = func.func_name = func_name;
    func.__class__ = klass;
    func.prototype = func;
    if (typeof parse_kwargs != 'undefined') func.parse_kwargs = parse_kwargs;
    return func;
}
function pyjs__instancemethod(klass, func_name, func, parse_kwargs) {
    var fn = function () {
        var _this = this;
        var argstart = 0;
        if (this.__is_instance__ !== true && arguments.length > 0) {
            _this = arguments[0];
            argstart = 1;
        }
        var args = new Array(_this);
        for (var a=argstart;a < arguments.length; a++) args.push(arguments[a]);
        if (pyjs_options.arg_is_instance) {
            if (_this.__is_instance__ === true) {
                if (pyjs_options.arg_instance_type) return func.apply(this, args);
                for (var c in _this.__mro__) {
                    var cls = _this.__mro__[c];
                    if (cls == klass) {
                        return func.apply(this, args);
                    }
                }
            }
            pyjs__exception_func_instance_expected(func_name, klass.__name__, _this);
        }
        return func.apply(this, args);
    };
    func.__name__ = func.func_name = func_name;
    func.__class__ = klass;
    if (typeof parse_kwargs != 'undefined') func.parse_kwargs = parse_kwargs;
    return fn;
}

function pyjs__staticmethod(klass, func_name, func, parse_kwargs) {
    func.__name__ = func.func_name = func_name;
    func.__class__ = klass;
    if (typeof parse_kwargs != 'undefined') func.parse_kwargs = parse_kwargs;
    return func;
}

function pyjs__classmethod(klass, func_name, func, parse_kwargs) {
    var fn = function () {
        if (pyjs_options.arg_is_instance && this.__is_instance__ !== true && this.__is_instance__ !== false) pyjs__exception_func_instance_expected(func_name, klass.__name__);
        var args = new Array(this.prototype);
        for (var a=0;a < arguments.length; a++) args.push(arguments[a]);
        return func.apply(this, args);
    };
    func.__name__ = func.func_name = func_name;
    func.__class__ = klass;
    if (typeof parse_kwargs != 'undefined') func.parse_kwargs = parse_kwargs;
    return fn;
}

function pyjs__subclasses__(cls_obj) {
    return cls_obj.__sub_classes__;
}

function pyjs__mro_merge(seqs) {
    var res = new Array();
    var i = 0;
    var cand = null;
    function resolve_error(candidates) {
        //throw "Cannot create a consistent method resolution order (MRO) for bases " + candidates[0].__name__ + ", "+ candidates[1].__name__;
        throw (pyjslib.TypeError("Cannot create a consistent method resolution order (MRO) for bases " + candidates[0].__name__ + ", "+ candidates[1].__name__));
    }
    for (;;) {
        var nonemptyseqs = new Array();
        for (var j = 0; j < seqs.length; j++) {
            if (seqs[j].length > 0) nonemptyseqs.push(seqs[j]);
        }
        if (nonemptyseqs.length == 0) return res;
        i++;
        var candidates = new Array();
        for (var j = 0; j < nonemptyseqs.length; j++) {
            cand = nonemptyseqs[j][0];
            candidates.push(cand);
            var nothead = new Array();
            for (var k = 0; k < nonemptyseqs.length; k++) {
                for (var m = 1; m < nonemptyseqs[k].length; m++) {
                    if (cand == nonemptyseqs[k][m]) {
                        nothead.push(nonemptyseqs[k]);
                    }
                }
            }
            if (nothead.length != 0)
                cand = null; // reject candidate
            else
                break;
        }
        if (cand == null) {
            resolve_error(candidates);
        }
        res.push(cand);
        for (var j = 0; j < nonemptyseqs.length; j++) {
            if (nonemptyseqs[j][0] == cand) {
                nonemptyseqs[j].shift();
            }
        }
    }
}

function pyjs__class_instance(class_name, module_name) {
    if (typeof module_name == 'undefined') module_name = typeof __mod_name__ == 'undefined' ? '__main__' : __mod_name__;
    var cls_fn = function(){
        var instance = cls_fn.__new__.apply(null, [cls_fn]);
        if (instance.__init__) {
            if (instance.__init__.apply(instance, arguments) != null) {
                //throw '__init__() should return None';
                throw pyjslib.TypeError('__init__() should return None');
            }
        }
        return instance;
    }
    cls_fn.__name__ = class_name;
    cls_fn.__module__ = module_name;
    cls_fn.toString = function() { return (this.__is_instance__ === true ? "instance of " : "class ") + (this.__module__?this.__module__ + "." : "") + this.__name__;}
    return cls_fn;
}

function pyjs__class_function(cls_fn, prop, bases) {
    if (typeof cls_fn != 'function') throw "compiler error? pyjs__class_function: typeof cls_fn != 'function'";
    var class_name = cls_fn.__name__;
    var class_module = cls_fn.__module__;
    var base_mro_list = new Array()
    for (var i = 0; i < bases.length; i++) {
        if (bases[i].__mro__ != null) {
            base_mro_list.push(new Array().concat(bases[i].__mro__));
        }
    }
    var __mro__ = pyjs__mro_merge(base_mro_list);

    for (var b = __mro__.length-1; b >= 0; b--) {
        var base = __mro__[b];
        for (var p in base) cls_fn[p] = base[p];
    }
    for (var p in prop) cls_fn[p] = prop[p];

    if (prop.__new__ == null) {
        cls_fn.__new__ = pyjs__bind_method(cls_fn, '__new__', function(cls) {
    var instance = function () {};
    instance.prototype = arguments[0].prototype;
    instance = new instance();
    instance.__dict__ = instance.__class__ = instance;
    instance.__is_instance__ = true;
    return instance;
}, function (__kwargs, cls) {
    if (typeof cls == 'undefined') {
        cls=__kwargs.cls;
        delete __kwargs.cls;
    } else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.cls != 'undefined') {
        pyjs__exception_func_multiple_values('__new__', 'cls');
    }
    if (pyjs_options.arg_kwarg_unexpected_keyword) {
        for (var i in __kwargs) {
            pyjs__exception_func_unexpected_keyword('__new__', i);
        }
    }
    var __r = [cls];
    for (var pyjs__va_arg = 2;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
        __r.push(arguments[pyjs__va_arg]);
    }

    return __r;
});

    }
    if (cls_fn['__init__'] == null) {
        cls_fn['__init__'] = pyjs__bind_method(cls_fn, '__init__', function () {
    if (this.__is_instance__ === true) {
        var self = this;
        if (pyjs_options.arg_count && arguments.length != 0) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length+1);
    } else {
        var self = arguments[0];
        if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
        if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length);
    }
    if (pyjs_options.arg_instance_type) {
        if (arguments.callee !== arguments.callee.__class__[arguments.callee.__name__]) {
            if (!pyjslib._isinstance(self, arguments.callee.__class__.slice(1))) {
                pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
            }
        }
    }
}, function (__kwargs) {
    var __r = [];
    return __r;
});
    }
    cls_fn.__name__ = class_name;
    cls_fn.__module__ = class_module;
    //cls_fn.__mro__ = pyjslib.List(new Array(cls_fn).concat(__mro__));
    cls_fn.__mro__ = new Array(cls_fn).concat(__mro__);
    cls_fn.prototype = cls_fn;
    cls_fn.__dict__ = cls_fn;
    cls_fn.__is_instance__ = false;
    cls_fn.__super_classes__ = bases;
    cls_fn.__sub_classes__ = new Array();
    for (var i = 0; i < bases.length; i++) {
        (bases[i]).__sub_classes__.push(cls_fn);
    }
    cls_fn.parse_kwargs = function () {
        return cls_fn.__init__.parse_kwargs.apply(null, arguments);
    }
    return cls_fn;
}

/* creates a class, derived from bases, with methods and variables */
function pyjs_type(clsname, bases, methods)
{
    var cls_instance = pyjs__class_instance(clsname);
    var obj = new Object;
    for (var i in methods) {
        if (typeof methods[i] == 'function') {
            obj[i] = pyjs__instancemethod(cls_instance, i, methods[i], methods[i].parse_kwargs);
        } else {
            obj[i] = methods[i];
        }
    }
    return pyjs__class_function(cls_instance, obj, bases);
}

String.prototype.__getitem__ = String.prototype.charAt;
String.prototype.upper = String.prototype.toUpperCase;
String.prototype.lower = String.prototype.toLowerCase;
String.prototype.find=pyjslib.String_find;
String.prototype.join=pyjslib.String_join;
String.prototype.isdigit=pyjslib.String_isdigit;
String.prototype.__iter__=pyjslib.String___iter__;

String.prototype.__replace=String.prototype.replace;
String.prototype.replace=pyjslib.String_replace;

String.prototype.split=pyjslib.String_split;
String.prototype.strip=pyjslib.String_strip;
String.prototype.lstrip=pyjslib.String_lstrip;
String.prototype.rstrip=pyjslib.String_rstrip;
String.prototype.startswith=pyjslib.String_startswith;
String.prototype.endswith=pyjslib.String_endswith;
String.prototype.ljust=pyjslib.String_ljust;
String.prototype.rjust=pyjslib.String_rjust;
String.prototype.center=pyjslib.String_center;

var str = String;



//
// END JS _pyjs.js
//


//
// BEGIN JS dynamicajax.js
//


function pyjs_createHttpRequest(){

	if(window.ActiveXObject){
		try {
			return new ActiveXObject("Msxml2.XMLHTTP");
		} catch (e) {
			try {
				return new ActiveXObject("Microsoft.XMLHTTP");
			} catch (e2) {
				return null;
	 		}
	 	}
	} else if(window.XMLHttpRequest){
		return new XMLHttpRequest();
	} else {
		return null;
	}
}

/**
 * activate_css(str)
 *
 * looks for any < link > in the input and sets up a corresponding link node
 * in the main document.
 *
 */

function pyjs_activate_css(targetnode)
{
	var scriptnodes = targetnode.getElementsByTagName('link')
	var LC;
	for (LC = 0; LC < scriptnodes.length; LC++)
	{
		var sn = scriptnodes[LC];
		sn.parentNode.removeChild(sn);

		fileref = document.createElement('link')

		if (sn.href)
		{
			fileref.href = sn.href;
		}
		else
		{
			fileref.text = sn.text;
		}

		fileref.rel = "stylesheet";
		fileref.type = "text/css";

		document.getElementsByTagName("head").item(0).appendChild(fileref);
	}
}

/**
 * activate_javascript(str)
 *
 * looks for any < script > in the input text and sets up a corresponding
 * script node in the main document.
 *
 */

function pyjs_activate_javascript(txt)
{
    var fileref = document.createElement('script')

    /*alert(txt);*/

    fileref.text = txt;
    fileref.type = "text/javascript";
    fileref.language = "javascript";
    /*
    fileref.defer = true;
    */

    /*alert(fileref.text);*/

    /*
    var debug = document.createElement('pre');
    debug.innerHTML = 'test';
    debug.innerHTML += "href:" + sn.src + " text:" + fileref.text;
    var bodyels = document.getElementsByTagName("body");
    bodyels[bodyels.length-1].appendChild(debug);
    */

    fileref = fileref.cloneNode(true);


    document.getElementsByTagName("head").item(0).appendChild(fileref);
}

function pyjs_eval(str)
{
    if (window.execScript) {
        window.execScript(str);
    } else {
        eval(str);
    }
}

/**
 * ajax_eval(url)
 *
 * @param url	load and activate url
 * @returns		readyState
 */

function pyjs_ajax_eval(url, on_load_fn, async)
{
    window.status = ('Loading ' + url);
    alert('Loading ' + url + async);

	var xhtoj = pyjs_createHttpRequest()
	var res = xhtoj.open("GET", url , async );

	xhtoj.onreadystatechange = function() 
	{
		if ((xhtoj.readyState==4) && (xhtoj.status == 200) )
		{
			str = xhtoj.responseText;

            pyjs_activate_javascript(str);

            window.status = ('Loaded ' + url);

            if (on_load_fn)
                pyjs_eval(on_load_fn);
		}
	}

	xhtoj.send("")
}

/**
 * pyjs_load_script
 *
 * @param url      load script url
 * @param module   module name
 * @param onload   text of function to be eval/executed on successful load
 */

function pyjs_load_script(url, onload, async)
{
    window.status = ('Loading ' + url);

    var e = document.createElement("script");
    e.src = url;
    e.type="text/javascript";
    e.language = "javascript";
    e.defer = async;
    e.onload = function()
    {
        window.status = ('Loaded ' + url);
        if (onload)
            pyjs_eval(onload);
        return true;
    };
    document.getElementsByTagName("head")[0].appendChild(e);
}

/**
 * ajax_dlink_refresh(oj,url)
 *
 * @param id	id of element for insert
 * @param url	load url
 * @param timeout	refresh timeout period, ms
 * @returns		readyState
 */

/* use these to overrun an existing timeout, so that
   we don't end up with several of them!
 */
var running_timeout = 0;
var timeout_idname;
var timeout_url;
var timeout_on_load_fn;
var redo_timeout;
var timeout_id = null;

function pyjs_ajax_dlink_refresh(idname, url, on_load_fn, timeout)
{
	timeout_idname = idname;
	timeout_url = url;
	timeout_on_load_fn = on_load_fn;
	redo_timeout = timeout;
	if (running_timeout)
		return;
	timeout_id = setTimeout("pyjs_do_ajax_dlink_refresh()", timeout);
	running_timeout = 1;
}

function pyjs_do_ajax_dlink_refresh()
{
	if (pyjs_ajax_dlink(timeout_idname, timeout_url, timeout_on_load_fn) == 0)
	{
        timeout_id = null;
		running_timeout = 0;
		return;
	}
    timeout_id = null;
	running_timeout = 0;
	ajax_dlink_refresh(timeout_idname, timeout_url, timeout_on_load_fn,
                       redo_timeout);
}

/**
 * ajax_dlink(oj,url)
 *
 * @param id	id of element for insert
 * @param url	load url
 * @returns		readyState
 */

function pyjs_ajax_dlink(idname, url, on_load_fn)
{
	var body = document.body;

    if (timeout_id)
        clearTimeout(timeout_id); /* really important - get into a mess otherwise */
	var xhtoj = pyjs_createHttpRequest();

	xhtoj.onreadystatechange = function() 
	{
		if (xhtoj.readyState==4)
		{
			var jsnode = 0;
			if (xhtoj.status == 200)
			{
				txt = xhtoj.responseText;

				jsnode = null;

                if (idname)
                    jsnode = document.getElementById(idname);

				if (!jsnode)
				{
                    jsnode = document.createElement('script')
                }

                /*
                var tst = document.createElement('html')
                tst.innerHTML = str;
                */
                pyjs_activate_javascript(txt);
                if (on_load_fn)
                {
                    alert(on_load_fn);
                    /*if (window.execScript) {
                        window.execScript(on_load_fn);
                    } else {
                        eval(on_load_fn);
                    }
                    */
                    test_fn();
                }

                return 1;
			}
			else
			{
				jsnode = document.getElementById(idname);

				if (jsnode)
				{
					jsnode.innerHTML = xhtoj.status;
				}
			}
		}
	}

	xhtoj.open("GET", url , true );
	xhtoj.send("");

	return 0;
}




//
// END JS dynamicajax.js
//




/*
 * prepare app system vars
 */
sys.overrides = new pyjslib.Dict({
		'mozilla.pyjslib': 'mozilla.pyjslib',
		'mozilla.pyjamas.DOM': 'mozilla.pyjamas.DOM'
	});
sys.platform = 'mozilla';
sys.appname = 'LlkApp';
sys.loadpath = './';

/* app libs */
// config

// module libs (usually imported javascript)



// module code

var config = function (__mod_name__) {
	if(config.__was_initialized__) return;
	config.__was_initialized__ = true;
	if (__mod_name__ == null) __mod_name__ = 'config';
	var __name__ = config.__name__ = __mod_name__;
	config.__track_lines__ = new Array();
		config.__track_lines__[1] = "config.py, line 1:\n    uwidth,uheight = (40, 40)";
		config.__track_lines__[2] = "config.py, line 2:\n    cwidth,cheight = (10,10)";
	try {
		track.module='config';
		track.lineno=1;
		track.lineno=1;
		var __tupleassign__000003 = new pyjslib.Tuple([40, 40]);
		config.uwidth = __tupleassign__000003.__getitem__(0);
		config.uheight = __tupleassign__000003.__getitem__(1);
		track.lineno=2;
		var __tupleassign__000004 = new pyjslib.Tuple([10, 10]);
		config.cwidth = __tupleassign__000004.__getitem__(0);
		config.cheight = __tupleassign__000004.__getitem__(1);

	} catch (pyjs_attr_err) {throw pyjslib._errorMapping(pyjs_attr_err)};
return this;
}; /* end config */ 




config_loaded_fn = function() {
}

config_prepare_mod = function() {
    if ((typeof (module_load_request['config']) == 'undefined') ||
        (module_load_request['config'] < 2)) {
        module_load_request['config'] = 2;
    }
    var modnames = new pyjslib.List([
		
	]);
    sys.overrides.update(new pyjslib.Dict({
		'mozilla.pyjslib': 'mozilla.pyjslib',
		'mozilla.pyjamas.DOM': 'mozilla.pyjamas.DOM'
	}));
    path = sys.loadpath;
    /*
    pyjslib.preload_app_modules(path, modnames, config_loaded_fn,
                                            0,
                                            null);
                                            //'config');
                                            */
    //alert("module ajax loaded fn called config");

    if (sys.appname != 'config')
    {
        if (module_load_request['config'] < 3) {
            module_load_request['config'] = 3;
        }
    }
}

//alert("module ajax loaded config");

config_prepare_mod();


// random

// module libs (usually imported javascript)



// module code

var random = function (__mod_name__) {
	if(random.__was_initialized__) return;
	random.__was_initialized__ = true;
	if (__mod_name__ == null) __mod_name__ = 'random';
	var __name__ = random.__name__ = __mod_name__;
	random.__track_lines__ = new Array();
		random.__track_lines__[1] = "random.py, line 1:\n    def randint(a, b):";
		random.__track_lines__[2] = "random.py, line 2:\n    return int(Math.random()*(b-a)+a)";
	try {
		track.module='random';
		track.lineno=1;
		track.lineno=1;
		random.randint = function(a, b) {
			if (pyjs_options.arg_count && arguments.length != 2) pyjs__exception_func_param(arguments.callee.__name__, 2, 2, arguments.length);
			track={module:'random',lineno:1};trackstack.push(track);
			track.module='random';
			track.lineno=1;
			track.lineno=2;
			track.lineno=2;
			var pyjs__ret = pyjslib.int( (  ( Math.random() *  ( b - a )  )  + a ) );
			trackstack.pop();track=trackstack.pop();trackstack.push(track);
			return pyjs__ret;
		};
		random.randint.__name__ = 'randint';

		random.randint.parse_kwargs = function ( __kwargs, a, b ) {
			if (typeof a == 'undefined') {
				a=__kwargs.a;
				delete __kwargs.a;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.a != 'undefined') {
				pyjs__exception_func_multiple_values('random.randint', 'a');
			}
			if (typeof b == 'undefined') {
				b=__kwargs.b;
				delete __kwargs.b;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.b != 'undefined') {
				pyjs__exception_func_multiple_values('random.randint', 'b');
			}
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('random.randint', i);
				}
			}
			var __r = [a, b];
			for (var pyjs__va_arg = 3;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		};

	} catch (pyjs_attr_err) {throw pyjslib._errorMapping(pyjs_attr_err)};
return this;
}; /* end random */ 




random_loaded_fn = function() {
}

random_prepare_mod = function() {
    if ((typeof (module_load_request['random']) == 'undefined') ||
        (module_load_request['random'] < 2)) {
        module_load_request['random'] = 2;
    }
    var modnames = new pyjslib.List([
		
	]);
    sys.overrides.update(new pyjslib.Dict({
		'mozilla.pyjslib': 'mozilla.pyjslib',
		'mozilla.pyjamas.DOM': 'mozilla.pyjamas.DOM'
	}));
    path = sys.loadpath;
    /*
    pyjslib.preload_app_modules(path, modnames, random_loaded_fn,
                                            0,
                                            null);
                                            //'random');
                                            */
    //alert("module ajax loaded fn called random");

    if (sys.appname != 'random')
    {
        if (module_load_request['random'] < 3) {
            module_load_request['random'] = 3;
        }
    }
}

//alert("module ajax loaded random");

random_prepare_mod();


// math

// module libs (usually imported javascript)



// module code

var math = function (__mod_name__) {
	if(math.__was_initialized__) return;
	math.__was_initialized__ = true;
	if (__mod_name__ == null) __mod_name__ = 'math';
	var __name__ = math.__name__ = __mod_name__;
	math.__track_lines__ = new Array();
		math.__track_lines__[1] = "math.py, line 1:\n    JS(\"\"\"";
		math.__track_lines__[19] = "math.py, line 1:\n    JS(\"\"\" ... \"\"\")";
	try {
		track.module='math';
		track.lineno=1;
		track.lineno=19;

math.ceil = Math.ceil;
math.fabs = Math.abs;
math.floor = Math.floor;
math.exp = Math.exp;
math.log = Math.log;
math.pow = Math.pow;
math.sqrt = Math.sqrt;
math.cos = Math.cos;
math.sin = Math.sin;
math.tan = Math.tan;
math.acos = Math.acos;
math.asin = Math.asin;
math.atan = Math.atan;
math.atan2 = Math.atan2;
math.pi = Math.PI;
math.e = Math.E;
math.random = Math.random;


	} catch (pyjs_attr_err) {throw pyjslib._errorMapping(pyjs_attr_err)};
return this;
}; /* end math */ 




math_loaded_fn = function() {
}

math_prepare_mod = function() {
    if ((typeof (module_load_request['math']) == 'undefined') ||
        (module_load_request['math'] < 2)) {
        module_load_request['math'] = 2;
    }
    var modnames = new pyjslib.List([
		
	]);
    sys.overrides.update(new pyjslib.Dict({
		'mozilla.pyjslib': 'mozilla.pyjslib',
		'mozilla.pyjamas.DOM': 'mozilla.pyjamas.DOM'
	}));
    path = sys.loadpath;
    /*
    pyjslib.preload_app_modules(path, modnames, math_loaded_fn,
                                            0,
                                            null);
                                            //'math');
                                            */
    //alert("module ajax loaded fn called math");

    if (sys.appname != 'math')
    {
        if (module_load_request['math'] < 3) {
            module_load_request['math'] = 3;
        }
    }
}

//alert("module ajax loaded math");

math_prepare_mod();


// lianliankan

// module libs (usually imported javascript)



// module code

var lianliankan = function (__mod_name__) {
	if(lianliankan.__was_initialized__) return;
	lianliankan.__was_initialized__ = true;
	if (__mod_name__ == null) __mod_name__ = 'lianliankan';
	var __name__ = lianliankan.__name__ = __mod_name__;
	lianliankan.__track_lines__ = new Array();
		lianliankan.__track_lines__[1] = "lianliankan.py, line 1:\n    # coding: utf-8";
		lianliankan.__track_lines__[3] = "lianliankan.py, line 3:\n    def trace(func):";
		lianliankan.__track_lines__[4] = "lianliankan.py, line 4:\n    def new_func(*args):";
		lianliankan.__track_lines__[5] = "lianliankan.py, line 5:\n    result = func(*args)";
		lianliankan.__track_lines__[6] = "lianliankan.py, line 6:\n    print func.__name__, args, result";
		lianliankan.__track_lines__[7] = "lianliankan.py, line 7:\n    return result";
		lianliankan.__track_lines__[8] = "lianliankan.py, line 8:\n    return new_func";
		lianliankan.__track_lines__[10] = "lianliankan.py, line 10:\n    def unsigned_range(a, b):";
		lianliankan.__track_lines__[11] = "lianliankan.py, line 11:\n    if a<b:";
		lianliankan.__track_lines__[12] = "lianliankan.py, line 12:\n    return range(a+1, b)";
		lianliankan.__track_lines__[14] = "lianliankan.py, line 14:\n    return range(b+1, a)";
		lianliankan.__track_lines__[16] = "lianliankan.py, line 16:\n    def get_range(max, a, b):";
		lianliankan.__track_lines__[17] = "lianliankan.py, line 17:\n    if a>b:";
		lianliankan.__track_lines__[18] = "lianliankan.py, line 18:\n    b,a = a,b";
		lianliankan.__track_lines__[19] = "lianliankan.py, line 19:\n    result = list(range(a,b+1))";
		lianliankan.__track_lines__[20] = "lianliankan.py, line 20:\n    result.extend(list(range(a-1,-1,-1)))";
		lianliankan.__track_lines__[21] = "lianliankan.py, line 21:\n    result.extend(list(range(b+1, max)))";
		lianliankan.__track_lines__[22] = "lianliankan.py, line 22:\n    return result";
		lianliankan.__track_lines__[24] = "lianliankan.py, line 24:\n    def checkllk(map, p1, p2):";
		lianliankan.__track_lines__[28] = "lianliankan.py, line 28:\n    height = len(map)";
		lianliankan.__track_lines__[29] = "lianliankan.py, line 29:\n    width = len(map[0])";
		lianliankan.__track_lines__[30] = "lianliankan.py, line 30:\n    def check_xline(x, y1, y2): # 横线 检查两点之间可以连接";
		lianliankan.__track_lines__[31] = "lianliankan.py, line 31:\n    if abs(y1-y2)<2:";
		lianliankan.__track_lines__[32] = "lianliankan.py, line 32:\n    return True";
		lianliankan.__track_lines__[33] = "lianliankan.py, line 33:\n    for i in unsigned_range(y1, y2):";
		lianliankan.__track_lines__[34] = "lianliankan.py, line 34:\n    if map[x][i]!=0:";
		lianliankan.__track_lines__[35] = "lianliankan.py, line 35:\n    return False";
		lianliankan.__track_lines__[36] = "lianliankan.py, line 36:\n    return True";
		lianliankan.__track_lines__[37] = "lianliankan.py, line 37:\n    def check_yline(y, x1, x2): # 竖线";
		lianliankan.__track_lines__[38] = "lianliankan.py, line 38:\n    if abs(x1-x2)<2:";
		lianliankan.__track_lines__[39] = "lianliankan.py, line 39:\n    return True";
		lianliankan.__track_lines__[40] = "lianliankan.py, line 40:\n    for i in unsigned_range(x1, x2):";
		lianliankan.__track_lines__[41] = "lianliankan.py, line 41:\n    if map[i][y]!=0:";
		lianliankan.__track_lines__[42] = "lianliankan.py, line 42:\n    return False";
		lianliankan.__track_lines__[43] = "lianliankan.py, line 43:\n    return True";
		lianliankan.__track_lines__[45] = "lianliankan.py, line 45:\n    x1,y1=p1";
		lianliankan.__track_lines__[46] = "lianliankan.py, line 46:\n    x2,y2=p2";
		lianliankan.__track_lines__[49] = "lianliankan.py, line 49:\n    if x1==x2 and check_xline(x1, y1, y2):";
		lianliankan.__track_lines__[50] = "lianliankan.py, line 50:\n    return [p1, p2]";
		lianliankan.__track_lines__[51] = "lianliankan.py, line 51:\n    if y1==y2 and check_yline(y1, x1, x2):";
		lianliankan.__track_lines__[52] = "lianliankan.py, line 52:\n    return [p1, p2]";
		lianliankan.__track_lines__[55] = "lianliankan.py, line 55:\n    for x in get_range(height, x1, x2):";
		lianliankan.__track_lines__[57] = "lianliankan.py, line 57:\n    if not ((x==x1 or map[x][y1]==0) and (x==x2 or map[x][y2]==0)):";
		lianliankan.__track_lines__[58] = "lianliankan.py, line 58:\n    continue";
		lianliankan.__track_lines__[59] = "lianliankan.py, line 59:\n    if check_yline(y1, x, x1) and check_yline(y2, x, x2) and check_xline(x, y1, y2):";
		lianliankan.__track_lines__[60] = "lianliankan.py, line 60:\n    if x==x1:";
		lianliankan.__track_lines__[61] = "lianliankan.py, line 61:\n    return [p1, (x,y2), p2]";
		lianliankan.__track_lines__[63] = "lianliankan.py, line 63:\n    return [p1, (x,y1), p2]";
		lianliankan.__track_lines__[65] = "lianliankan.py, line 65:\n    return [p1, (x,y1), (x,y2), p2]";
		lianliankan.__track_lines__[66] = "lianliankan.py, line 66:\n    for y in get_range(width, y1, y2):";
		lianliankan.__track_lines__[67] = "lianliankan.py, line 67:\n    if not ((y==y1 or map[x1][y]==0) and (y==y2 or map[x2][y]==0)):";
		lianliankan.__track_lines__[68] = "lianliankan.py, line 68:\n    continue";
		lianliankan.__track_lines__[69] = "lianliankan.py, line 69:\n    if check_xline(x1, y, y1) and check_xline(x2, y, y2) and check_yline(y, x1, x2):";
		lianliankan.__track_lines__[70] = "lianliankan.py, line 70:\n    if y==y1:";
		lianliankan.__track_lines__[71] = "lianliankan.py, line 71:\n    return [p1, (x2,y), p2]";
		lianliankan.__track_lines__[73] = "lianliankan.py, line 73:\n    return [p1, (x1,y), p2]";
		lianliankan.__track_lines__[75] = "lianliankan.py, line 75:\n    return [p1, (x1,y), (x2,y), p2]";
		lianliankan.__track_lines__[76] = "lianliankan.py, line 76:\n    return False";
	try {
		track.module='lianliankan';
		track.lineno=1;
		track.lineno=3;
		lianliankan.trace = function(func) {
			if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length);
			track={module:'lianliankan',lineno:3};trackstack.push(track);
			track.module='lianliankan';
			track.lineno=3;
			track.lineno=4;
			new_func = function() {
				if (pyjs_options.arg_count && arguments.length < 0) pyjs__exception_func_param(arguments.callee.__name__, 0, null, arguments.length);
				var args = pyjslib.Tuple();
				for (var pyjs__va_arg = 0; pyjs__va_arg < arguments.length; pyjs__va_arg++) {
					var pyjs__arg = arguments[pyjs__va_arg];
					args.append(pyjs__arg);
				}
				track={module:'lianliankan',lineno:4};trackstack.push(track);
				track.module='lianliankan';
				track.lineno=4;
				track.lineno=5;
				var result = pyjs_kwargs_function_call(func, args, null, [{}]);
				track.lineno=6;
				pyjslib.printFunc([(func.__name__===undefined?(function(){throw new TypeError('func.__name__ is undefined')})():(typeof func.__name__ == 'function' && func.__is_instance__?pyjslib.getattr(func, '__name__'):func.__name__)), args, result], 1);
				track.lineno=7;
				track.lineno=7;
				var pyjs__ret = result;
				trackstack.pop();track=trackstack.pop();trackstack.push(track);
				return pyjs__ret;
			};
			new_func.__name__ = 'new_func';

			new_func.parse_kwargs = function ( __kwargs ) {
				if (pyjs_options.arg_kwarg_unexpected_keyword) {
					for (var i in __kwargs) {
						pyjs__exception_func_unexpected_keyword('new_func', i);
					}
				}
				var __r = [];
				for (var pyjs__va_arg = 1;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
					__r.push(arguments[pyjs__va_arg]);
				}

				return __r;
			};
			track.lineno=8;
			track.lineno=8;
			var pyjs__ret = new_func;
			trackstack.pop();track=trackstack.pop();trackstack.push(track);
			return pyjs__ret;
		};
		lianliankan.trace.__name__ = 'trace';

		lianliankan.trace.parse_kwargs = function ( __kwargs, func ) {
			if (typeof func == 'undefined') {
				func=__kwargs.func;
				delete __kwargs.func;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.func != 'undefined') {
				pyjs__exception_func_multiple_values('lianliankan.trace', 'func');
			}
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('lianliankan.trace', i);
				}
			}
			var __r = [func];
			for (var pyjs__va_arg = 2;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		};
		track.lineno=10;
		lianliankan.unsigned_range = function(a, b) {
			if (pyjs_options.arg_count && arguments.length != 2) pyjs__exception_func_param(arguments.callee.__name__, 2, 2, arguments.length);
			track={module:'lianliankan',lineno:10};trackstack.push(track);
			track.module='lianliankan';
			track.lineno=10;
			track.lineno=11;
			if (pyjslib.bool((pyjslib.cmp(a, b) == -1))) {
				track.lineno=12;
				track.lineno=12;
				var pyjs__ret = pyjslib.range( ( a + 1 ) , b);
				trackstack.pop();track=trackstack.pop();trackstack.push(track);
				return pyjs__ret;
			}
			else {
				track.lineno=14;
				track.lineno=14;
				var pyjs__ret = pyjslib.range( ( b + 1 ) , a);
				trackstack.pop();track=trackstack.pop();trackstack.push(track);
				return pyjs__ret;
			}
			trackstack.pop();track=trackstack.pop();trackstack.push(track);
			return null;
		};
		lianliankan.unsigned_range.__name__ = 'unsigned_range';

		lianliankan.unsigned_range.parse_kwargs = function ( __kwargs, a, b ) {
			if (typeof a == 'undefined') {
				a=__kwargs.a;
				delete __kwargs.a;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.a != 'undefined') {
				pyjs__exception_func_multiple_values('lianliankan.unsigned_range', 'a');
			}
			if (typeof b == 'undefined') {
				b=__kwargs.b;
				delete __kwargs.b;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.b != 'undefined') {
				pyjs__exception_func_multiple_values('lianliankan.unsigned_range', 'b');
			}
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('lianliankan.unsigned_range', i);
				}
			}
			var __r = [a, b];
			for (var pyjs__va_arg = 3;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		};
		track.lineno=16;
		lianliankan.get_range = function(max, a, b) {
			if (pyjs_options.arg_count && arguments.length != 3) pyjs__exception_func_param(arguments.callee.__name__, 3, 3, arguments.length);
			track={module:'lianliankan',lineno:16};trackstack.push(track);
			track.module='lianliankan';
			track.lineno=16;
			track.lineno=17;
			if (pyjslib.bool((pyjslib.cmp(a, b) == 1))) {
				track.lineno=18;
				var __tupleassign__000004 = new pyjslib.Tuple([a, b]);
				b = __tupleassign__000004.__getitem__(0);
				a = __tupleassign__000004.__getitem__(1);
			}
			track.lineno=19;
			var result = pyjslib.list(pyjslib.range(a,  ( b + 1 ) ));
			track.lineno=20;
			result.extend(pyjslib.list(pyjslib.range( ( a - 1 ) , -1, -1)));
			track.lineno=21;
			result.extend(pyjslib.list(pyjslib.range( ( b + 1 ) , max)));
			track.lineno=22;
			track.lineno=22;
			var pyjs__ret = result;
			trackstack.pop();track=trackstack.pop();trackstack.push(track);
			return pyjs__ret;
		};
		lianliankan.get_range.__name__ = 'get_range';

		lianliankan.get_range.parse_kwargs = function ( __kwargs, max, a, b ) {
			if (typeof max == 'undefined') {
				max=__kwargs.max;
				delete __kwargs.max;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.max != 'undefined') {
				pyjs__exception_func_multiple_values('lianliankan.get_range', 'max');
			}
			if (typeof a == 'undefined') {
				a=__kwargs.a;
				delete __kwargs.a;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.a != 'undefined') {
				pyjs__exception_func_multiple_values('lianliankan.get_range', 'a');
			}
			if (typeof b == 'undefined') {
				b=__kwargs.b;
				delete __kwargs.b;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.b != 'undefined') {
				pyjs__exception_func_multiple_values('lianliankan.get_range', 'b');
			}
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('lianliankan.get_range', i);
				}
			}
			var __r = [max, a, b];
			for (var pyjs__va_arg = 4;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		};
		track.lineno=24;
		lianliankan.checkllk = function(map, p1, p2) {
			if (pyjs_options.arg_count && arguments.length != 3) pyjs__exception_func_param(arguments.callee.__name__, 3, 3, arguments.length);
			track={module:'lianliankan',lineno:24};trackstack.push(track);
			track.module='lianliankan';
			track.lineno=24;
			track.lineno=28;
			var height = pyjslib.len(map);
			track.lineno=29;
			var width = pyjslib.len(map.__getitem__(0));
			track.lineno=30;
			check_xline = function(x, y1, y2) {
				if (pyjs_options.arg_count && arguments.length != 3) pyjs__exception_func_param(arguments.callee.__name__, 3, 3, arguments.length);
				track={module:'lianliankan',lineno:30};trackstack.push(track);
				track.module='lianliankan';
				track.lineno=30;
				track.lineno=31;
				if (pyjslib.bool((pyjslib.cmp(pyjslib.abs( ( y1 - y2 ) ), 2) == -1))) {
					track.lineno=32;
					track.lineno=32;
					var pyjs__ret = true;
					trackstack.pop();track=trackstack.pop();trackstack.push(track);
					return pyjs__ret;
				}
				track.lineno=33;
				var pyjs__trackstack_size_1=trackstack.length;
				var __i = lianliankan.unsigned_range(y1, y2).__iter__();
				try {
					while (true) {
						var i = __i.next();
						
						track.lineno=34;
						if (pyjslib.bool((map.__getitem__(x).__getitem__(i) != 0))) {
							track.lineno=35;
							track.lineno=35;
							var pyjs__ret = false;
							trackstack.pop();track=trackstack.pop();trackstack.push(track);
							return pyjs__ret;
						}
					}
				} catch (e) {
					if (e.__name__ != 'StopIteration') {
						throw e;
					}
				}
				if (trackstack.length > pyjs__trackstack_size_1) {
					trackstack = trackstack.slice(0,pyjs__trackstack_size_1);
					track = trackstack.slice(-1)[0];
				}
				track.module='lianliankan';
				track.lineno=36;
				track.lineno=36;
				var pyjs__ret = true;
				trackstack.pop();track=trackstack.pop();trackstack.push(track);
				return pyjs__ret;
			};
			check_xline.__name__ = 'check_xline';

			check_xline.parse_kwargs = function ( __kwargs, x, y1, y2 ) {
				if (typeof x == 'undefined') {
					x=__kwargs.x;
					delete __kwargs.x;
				} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.x != 'undefined') {
					pyjs__exception_func_multiple_values('check_xline', 'x');
				}
				if (typeof y1 == 'undefined') {
					y1=__kwargs.y1;
					delete __kwargs.y1;
				} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.y1 != 'undefined') {
					pyjs__exception_func_multiple_values('check_xline', 'y1');
				}
				if (typeof y2 == 'undefined') {
					y2=__kwargs.y2;
					delete __kwargs.y2;
				} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.y2 != 'undefined') {
					pyjs__exception_func_multiple_values('check_xline', 'y2');
				}
				if (pyjs_options.arg_kwarg_unexpected_keyword) {
					for (var i in __kwargs) {
						pyjs__exception_func_unexpected_keyword('check_xline', i);
					}
				}
				var __r = [x, y1, y2];
				for (var pyjs__va_arg = 4;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
					__r.push(arguments[pyjs__va_arg]);
				}

				return __r;
			};
			track.lineno=37;
			check_yline = function(y, x1, x2) {
				if (pyjs_options.arg_count && arguments.length != 3) pyjs__exception_func_param(arguments.callee.__name__, 3, 3, arguments.length);
				track={module:'lianliankan',lineno:37};trackstack.push(track);
				track.module='lianliankan';
				track.lineno=37;
				track.lineno=38;
				if (pyjslib.bool((pyjslib.cmp(pyjslib.abs( ( x1 - x2 ) ), 2) == -1))) {
					track.lineno=39;
					track.lineno=39;
					var pyjs__ret = true;
					trackstack.pop();track=trackstack.pop();trackstack.push(track);
					return pyjs__ret;
				}
				track.lineno=40;
				var pyjs__trackstack_size_1=trackstack.length;
				var __i = lianliankan.unsigned_range(x1, x2).__iter__();
				try {
					while (true) {
						var i = __i.next();
						
						track.lineno=41;
						if (pyjslib.bool((map.__getitem__(i).__getitem__(y) != 0))) {
							track.lineno=42;
							track.lineno=42;
							var pyjs__ret = false;
							trackstack.pop();track=trackstack.pop();trackstack.push(track);
							return pyjs__ret;
						}
					}
				} catch (e) {
					if (e.__name__ != 'StopIteration') {
						throw e;
					}
				}
				if (trackstack.length > pyjs__trackstack_size_1) {
					trackstack = trackstack.slice(0,pyjs__trackstack_size_1);
					track = trackstack.slice(-1)[0];
				}
				track.module='lianliankan';
				track.lineno=43;
				track.lineno=43;
				var pyjs__ret = true;
				trackstack.pop();track=trackstack.pop();trackstack.push(track);
				return pyjs__ret;
			};
			check_yline.__name__ = 'check_yline';

			check_yline.parse_kwargs = function ( __kwargs, y, x1, x2 ) {
				if (typeof y == 'undefined') {
					y=__kwargs.y;
					delete __kwargs.y;
				} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.y != 'undefined') {
					pyjs__exception_func_multiple_values('check_yline', 'y');
				}
				if (typeof x1 == 'undefined') {
					x1=__kwargs.x1;
					delete __kwargs.x1;
				} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.x1 != 'undefined') {
					pyjs__exception_func_multiple_values('check_yline', 'x1');
				}
				if (typeof x2 == 'undefined') {
					x2=__kwargs.x2;
					delete __kwargs.x2;
				} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.x2 != 'undefined') {
					pyjs__exception_func_multiple_values('check_yline', 'x2');
				}
				if (pyjs_options.arg_kwarg_unexpected_keyword) {
					for (var i in __kwargs) {
						pyjs__exception_func_unexpected_keyword('check_yline', i);
					}
				}
				var __r = [y, x1, x2];
				for (var pyjs__va_arg = 4;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
					__r.push(arguments[pyjs__va_arg]);
				}

				return __r;
			};
			track.lineno=45;
			var __tupleassign__000005 = p1;
			var x1 = __tupleassign__000005.__getitem__(0);
			var y1 = __tupleassign__000005.__getitem__(1);
			track.lineno=46;
			var __tupleassign__000006 = p2;
			var x2 = __tupleassign__000006.__getitem__(0);
			var y2 = __tupleassign__000006.__getitem__(1);
			track.lineno=49;
			if (pyjslib.bool((pyjslib.eq(x1, x2)) && (check_xline(x1, y1, y2)))) {
				track.lineno=50;
				track.lineno=50;
				var pyjs__ret = new pyjslib.List([p1, p2]);
				trackstack.pop();track=trackstack.pop();trackstack.push(track);
				return pyjs__ret;
			}
			track.lineno=51;
			if (pyjslib.bool((pyjslib.eq(y1, y2)) && (check_yline(y1, x1, x2)))) {
				track.lineno=52;
				track.lineno=52;
				var pyjs__ret = new pyjslib.List([p1, p2]);
				trackstack.pop();track=trackstack.pop();trackstack.push(track);
				return pyjs__ret;
			}
			track.lineno=55;
			var pyjs__trackstack_size_1=trackstack.length;
			var __x = lianliankan.get_range(height, x1, x2).__iter__();
			try {
				while (true) {
					var x = __x.next();
					
					track.lineno=57;
					if (pyjslib.bool(!(((pyjslib.eq(x, x1)) || (pyjslib.eq(map.__getitem__(x).__getitem__(y1), 0))) && ((pyjslib.eq(x, x2)) || (pyjslib.eq(map.__getitem__(x).__getitem__(y2), 0)))))) {
						track.lineno=58;
						continue;
					}
					track.lineno=59;
					if (pyjslib.bool((check_yline(y1, x, x1)) && (check_yline(y2, x, x2)) && (check_xline(x, y1, y2)))) {
						track.lineno=60;
						if (pyjslib.bool(pyjslib.eq(x, x1))) {
							track.lineno=61;
							track.lineno=61;
							var pyjs__ret = new pyjslib.List([p1, new pyjslib.Tuple([x, y2]), p2]);
							trackstack.pop();track=trackstack.pop();trackstack.push(track);
							return pyjs__ret;
						}
						else if (pyjslib.bool(pyjslib.eq(x, x2))) {
							track.lineno=63;
							track.lineno=63;
							var pyjs__ret = new pyjslib.List([p1, new pyjslib.Tuple([x, y1]), p2]);
							trackstack.pop();track=trackstack.pop();trackstack.push(track);
							return pyjs__ret;
						}
						else {
							track.lineno=65;
							track.lineno=65;
							var pyjs__ret = new pyjslib.List([p1, new pyjslib.Tuple([x, y1]), new pyjslib.Tuple([x, y2]), p2]);
							trackstack.pop();track=trackstack.pop();trackstack.push(track);
							return pyjs__ret;
						}
					}
				}
			} catch (e) {
				if (e.__name__ != 'StopIteration') {
					throw e;
				}
			}
			if (trackstack.length > pyjs__trackstack_size_1) {
				trackstack = trackstack.slice(0,pyjs__trackstack_size_1);
				track = trackstack.slice(-1)[0];
			}
			track.module='lianliankan';
			track.lineno=66;
			var pyjs__trackstack_size_1=trackstack.length;
			var __y = lianliankan.get_range(width, y1, y2).__iter__();
			try {
				while (true) {
					var y = __y.next();
					
					track.lineno=67;
					if (pyjslib.bool(!(((pyjslib.eq(y, y1)) || (pyjslib.eq(map.__getitem__(x1).__getitem__(y), 0))) && ((pyjslib.eq(y, y2)) || (pyjslib.eq(map.__getitem__(x2).__getitem__(y), 0)))))) {
						track.lineno=68;
						continue;
					}
					track.lineno=69;
					if (pyjslib.bool((check_xline(x1, y, y1)) && (check_xline(x2, y, y2)) && (check_yline(y, x1, x2)))) {
						track.lineno=70;
						if (pyjslib.bool(pyjslib.eq(y, y1))) {
							track.lineno=71;
							track.lineno=71;
							var pyjs__ret = new pyjslib.List([p1, new pyjslib.Tuple([x2, y]), p2]);
							trackstack.pop();track=trackstack.pop();trackstack.push(track);
							return pyjs__ret;
						}
						else if (pyjslib.bool(pyjslib.eq(y, y2))) {
							track.lineno=73;
							track.lineno=73;
							var pyjs__ret = new pyjslib.List([p1, new pyjslib.Tuple([x1, y]), p2]);
							trackstack.pop();track=trackstack.pop();trackstack.push(track);
							return pyjs__ret;
						}
						else {
							track.lineno=75;
							track.lineno=75;
							var pyjs__ret = new pyjslib.List([p1, new pyjslib.Tuple([x1, y]), new pyjslib.Tuple([x2, y]), p2]);
							trackstack.pop();track=trackstack.pop();trackstack.push(track);
							return pyjs__ret;
						}
					}
				}
			} catch (e) {
				if (e.__name__ != 'StopIteration') {
					throw e;
				}
			}
			if (trackstack.length > pyjs__trackstack_size_1) {
				trackstack = trackstack.slice(0,pyjs__trackstack_size_1);
				track = trackstack.slice(-1)[0];
			}
			track.module='lianliankan';
			track.lineno=76;
			track.lineno=76;
			var pyjs__ret = false;
			trackstack.pop();track=trackstack.pop();trackstack.push(track);
			return pyjs__ret;
		};
		lianliankan.checkllk.__name__ = 'checkllk';

		lianliankan.checkllk.parse_kwargs = function ( __kwargs, map, p1, p2 ) {
			if (typeof map == 'undefined') {
				map=__kwargs.map;
				delete __kwargs.map;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.map != 'undefined') {
				pyjs__exception_func_multiple_values('lianliankan.checkllk', 'map');
			}
			if (typeof p1 == 'undefined') {
				p1=__kwargs.p1;
				delete __kwargs.p1;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.p1 != 'undefined') {
				pyjs__exception_func_multiple_values('lianliankan.checkllk', 'p1');
			}
			if (typeof p2 == 'undefined') {
				p2=__kwargs.p2;
				delete __kwargs.p2;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.p2 != 'undefined') {
				pyjs__exception_func_multiple_values('lianliankan.checkllk', 'p2');
			}
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('lianliankan.checkllk', i);
				}
			}
			var __r = [map, p1, p2];
			for (var pyjs__va_arg = 4;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		};

	} catch (pyjs_attr_err) {throw pyjslib._errorMapping(pyjs_attr_err)};
return this;
}; /* end lianliankan */ 




lianliankan_loaded_fn = function() {
}

lianliankan_prepare_mod = function() {
    if ((typeof (module_load_request['lianliankan']) == 'undefined') ||
        (module_load_request['lianliankan'] < 2)) {
        module_load_request['lianliankan'] = 2;
    }
    var modnames = new pyjslib.List([
		
	]);
    sys.overrides.update(new pyjslib.Dict({
		'mozilla.pyjslib': 'mozilla.pyjslib',
		'mozilla.pyjamas.DOM': 'mozilla.pyjamas.DOM'
	}));
    path = sys.loadpath;
    /*
    pyjslib.preload_app_modules(path, modnames, lianliankan_loaded_fn,
                                            0,
                                            null);
                                            //'lianliankan');
                                            */
    //alert("module ajax loaded fn called lianliankan");

    if (sys.appname != 'lianliankan')
    {
        if (module_load_request['lianliankan'] < 3) {
            module_load_request['lianliankan'] = 3;
        }
    }
}

//alert("module ajax loaded lianliankan");

lianliankan_prepare_mod();


// pyjamas

// module libs (usually imported javascript)



// module code

var pyjamas = function (__mod_name__) {
	if(pyjamas.__was_initialized__) return;
	pyjamas.__was_initialized__ = true;
	if (__mod_name__ == null) __mod_name__ = 'pyjamas';
	var __name__ = pyjamas.__name__ = __mod_name__;
	pyjamas.__track_lines__ = new Array();
		pyjamas.__track_lines__[1] = "pyjamas.py, line 1:\n    #from pyjamas import Window";
	try {
		track.module='pyjamas';
		track.lineno=1;

	} catch (pyjs_attr_err) {throw pyjslib._errorMapping(pyjs_attr_err)};
return this;
}; /* end pyjamas */ 




pyjamas_loaded_fn = function() {
}

pyjamas_prepare_mod = function() {
    if ((typeof (module_load_request['pyjamas']) == 'undefined') ||
        (module_load_request['pyjamas'] < 2)) {
        module_load_request['pyjamas'] = 2;
    }
    var modnames = new pyjslib.List([
		
	]);
    sys.overrides.update(new pyjslib.Dict({
		'mozilla.pyjslib': 'mozilla.pyjslib',
		'mozilla.pyjamas.DOM': 'mozilla.pyjamas.DOM'
	}));
    path = sys.loadpath;
    /*
    pyjslib.preload_app_modules(path, modnames, pyjamas_loaded_fn,
                                            0,
                                            null);
                                            //'pyjamas');
                                            */
    //alert("module ajax loaded fn called pyjamas");

    if (sys.appname != 'pyjamas')
    {
        if (module_load_request['pyjamas'] < 3) {
            module_load_request['pyjamas'] = 3;
        }
    }
}

//alert("module ajax loaded pyjamas");

pyjamas_prepare_mod();


// pyjamas.DOM

// module libs (usually imported javascript)



// module code

pyjamas.DOM = function (__mod_name__) {
	if(pyjamas.DOM.__was_initialized__) return;
	pyjamas.DOM.__was_initialized__ = true;
	if (__mod_name__ == null) __mod_name__ = 'pyjamas.DOM';
	var __name__ = pyjamas.DOM.__name__ = __mod_name__;
	pyjamas.DOM.__track_lines__ = new Array();
	var DOM = pyjamas.DOM;

		pyjamas.DOM.__track_lines__[1] = "pyjamas.DOM.py, line 1:\n    # Copyright 2006 James Tauber and contributors";
		pyjamas.DOM.__track_lines__[513] = "pyjamas.DOM.py, line 513:\n    def iterChildren(elem):";
		pyjamas.DOM.__track_lines__[12] = "pyjamas.DOM.py, line 2:\n    # ... # See the License for the specific language governing permissions and";
		pyjamas.DOM.__track_lines__[15] = "pyjamas.DOM.py, line 15:\n    from __pyjamas__ import JS";
		pyjamas.DOM.__track_lines__[17] = "pyjamas.DOM.py, line 17:\n    sCaptureElem = None";
		pyjamas.DOM.__track_lines__[18] = "pyjamas.DOM.py, line 18:\n    sEventPreviewStack = []";
		pyjamas.DOM.__track_lines__[19] = "pyjamas.DOM.py, line 19:\n    currentEvent = None";
		pyjamas.DOM.__track_lines__[21] = "pyjamas.DOM.py, line 21:\n    def init():";
		pyjamas.DOM.__track_lines__[24] = "pyjamas.DOM.py, line 15:\n    from __pyjamas__ import JS ... $wnd.__dispatchCapturedMouseEvent = function(evt) {";
		pyjamas.DOM.__track_lines__[538] = "pyjamas.DOM.py, line 518:\n    JS(\"\"\" ... \"\"\")";
		pyjamas.DOM.__track_lines__[540] = "pyjamas.DOM.py, line 540:\n    def walkChildren(elem):";
		pyjamas.DOM.__track_lines__[688] = "pyjamas.DOM.py, line 688:\n    def setInnerHTML(element, html):";
		pyjamas.DOM.__track_lines__[774] = "pyjamas.DOM.py, line 774:\n    if len(sEventPreviewStack) > 0:";
		pyjamas.DOM.__track_lines__[604] = "pyjamas.DOM.py, line 604:\n    def removeChild(parent, child):";
		pyjamas.DOM.__track_lines__[607] = "pyjamas.DOM.py, line 605:\n    JS(\"\"\" ... \"\"\")";
		pyjamas.DOM.__track_lines__[769] = "pyjamas.DOM.py, line 769:\n    dispatchEventImpl(event, element, listener)";
		pyjamas.DOM.__track_lines__[694] = "pyjamas.DOM.py, line 689:\n    JS(\"\"\" ... \"\"\")";
		pyjamas.DOM.__track_lines__[70] = "pyjamas.DOM.py, line 49:\n    if (!evt.relatedTarget) { ... $wnd.addEventListener(\'keydown\', $wnd.__dispatchCapturedEvent, true);";
		pyjamas.DOM.__track_lines__[584] = "pyjamas.DOM.py, line 546:\n    JS(\"\"\" ... \"\"\")";
		pyjamas.DOM.__track_lines__[586] = "pyjamas.DOM.py, line 134:\n    def createInputCheck(): ... def isOrHasChild(parent, child):";
		pyjamas.DOM.__track_lines__[598] = "pyjamas.DOM.py, line 160:\n     ... def releaseCapture(elem):";
		pyjamas.DOM.__track_lines__[804] = "pyjamas.DOM.py, line 804:\n    setInnerText(option, item)";
		pyjamas.DOM.__track_lines__[89] = "pyjamas.DOM.py, line 22:\n    JS(\"\"\" ... \"\"\")";
		pyjamas.DOM.__track_lines__[91] = "pyjamas.DOM.py, line 91:\n    def addEventPreview(preview):";
		pyjamas.DOM.__track_lines__[92] = "pyjamas.DOM.py, line 92:\n    global sEventPreviewStack";
		pyjamas.DOM.__track_lines__[93] = "pyjamas.DOM.py, line 93:\n    sEventPreviewStack.append(preview)";
		pyjamas.DOM.__track_lines__[95] = "pyjamas.DOM.py, line 95:\n    def appendChild(parent, child):";
		pyjamas.DOM.__track_lines__[609] = "pyjamas.DOM.py, line 609:\n    def replaceChild(parent, newChild, oldChild):";
		pyjamas.DOM.__track_lines__[98] = "pyjamas.DOM.py, line 96:\n    JS(\"\"\" ... \"\"\")";
		pyjamas.DOM.__track_lines__[100] = "pyjamas.DOM.py, line 2:\n    # ... def compare(elem1, elem2):";
		pyjamas.DOM.__track_lines__[614] = "pyjamas.DOM.py, line 614:\n    def removeEventPreview(preview):";
		pyjamas.DOM.__track_lines__[615] = "pyjamas.DOM.py, line 615:\n    global sEventPreviewStack";
		pyjamas.DOM.__track_lines__[616] = "pyjamas.DOM.py, line 616:\n    sEventPreviewStack.remove(preview)";
		pyjamas.DOM.__track_lines__[105] = "pyjamas.DOM.py, line 105:\n    def createAnchor():";
		pyjamas.DOM.__track_lines__[106] = "pyjamas.DOM.py, line 106:\n    return createElement(\"A\")";
		pyjamas.DOM.__track_lines__[108] = "pyjamas.DOM.py, line 108:\n    def createButton():";
		pyjamas.DOM.__track_lines__[109] = "pyjamas.DOM.py, line 109:\n    return createElement(\"button\")";
		pyjamas.DOM.__track_lines__[111] = "pyjamas.DOM.py, line 95:\n    def appendChild(parent, child): ... def createCol():";
		pyjamas.DOM.__track_lines__[112] = "pyjamas.DOM.py, line 112:\n    return createElement(\"col\")";
		pyjamas.DOM.__track_lines__[114] = "pyjamas.DOM.py, line 114:\n    def createDiv():";
		pyjamas.DOM.__track_lines__[115] = "pyjamas.DOM.py, line 115:\n    return createElement(\"div\")";
		pyjamas.DOM.__track_lines__[117] = "pyjamas.DOM.py, line 117:\n    def createElement(tag):";
		pyjamas.DOM.__track_lines__[120] = "pyjamas.DOM.py, line 118:\n    JS(\"\"\" ... \"\"\")";
		pyjamas.DOM.__track_lines__[122] = "pyjamas.DOM.py, line 122:\n    def createFieldSet():";
		pyjamas.DOM.__track_lines__[123] = "pyjamas.DOM.py, line 123:\n    return createElement(\"fieldset\")";
		pyjamas.DOM.__track_lines__[125] = "pyjamas.DOM.py, line 125:\n    def createForm():";
		pyjamas.DOM.__track_lines__[126] = "pyjamas.DOM.py, line 126:\n    return createElement(\"form\")";
		pyjamas.DOM.__track_lines__[686] = "pyjamas.DOM.py, line 684:\n    JS(\"\"\" ... \"\"\")";
		pyjamas.DOM.__track_lines__[128] = "pyjamas.DOM.py, line 128:\n    def createIFrame():";
		pyjamas.DOM.__track_lines__[129] = "pyjamas.DOM.py, line 129:\n    return createElement(\"iframe\")";
		pyjamas.DOM.__track_lines__[131] = "pyjamas.DOM.py, line 114:\n    def createDiv(): ... def createImg():";
		pyjamas.DOM.__track_lines__[132] = "pyjamas.DOM.py, line 132:\n    return createElement(\"img\")";
		pyjamas.DOM.__track_lines__[618] = "pyjamas.DOM.py, line 618:\n    def scrollIntoView(elem):";
		pyjamas.DOM.__track_lines__[134] = "pyjamas.DOM.py, line 134:\n    def createInputCheck():";
		pyjamas.DOM.__track_lines__[135] = "pyjamas.DOM.py, line 135:\n    return createInputElement(\"checkbox\")";
		pyjamas.DOM.__track_lines__[137] = "pyjamas.DOM.py, line 137:\n    def createInputElement(elementType):";
		pyjamas.DOM.__track_lines__[791] = "pyjamas.DOM.py, line 791:\n    if eventGetType(event) == \"losecapture\":";
		pyjamas.DOM.__track_lines__[706] = "pyjamas.DOM.py, line 706:\n    def setIntAttribute(elem, attr, value):";
		pyjamas.DOM.__track_lines__[142] = "pyjamas.DOM.py, line 138:\n    JS(\"\"\" ... \"\"\")";
		pyjamas.DOM.__track_lines__[655] = "pyjamas.DOM.py, line 619:\n    JS(\"\"\" ... \"\"\")";
		pyjamas.DOM.__track_lines__[144] = "pyjamas.DOM.py, line 144:\n    def createInputPassword():";
		pyjamas.DOM.__track_lines__[145] = "pyjamas.DOM.py, line 145:\n    return createInputElement(\"password\")";
		pyjamas.DOM.__track_lines__[147] = "pyjamas.DOM.py, line 147:\n    def createInputRadio(group):";
		pyjamas.DOM.__track_lines__[660] = "pyjamas.DOM.py, line 658:\n    JS(\"\"\" ... \"\"\")";
		pyjamas.DOM.__track_lines__[662] = "pyjamas.DOM.py, line 662:\n    def setAttribute(element, attribute, value):";
		pyjamas.DOM.__track_lines__[153] = "pyjamas.DOM.py, line 148:\n    JS(\"\"\" ... \"\"\")";
		pyjamas.DOM.__track_lines__[155] = "pyjamas.DOM.py, line 155:\n    def createInputText():";
		pyjamas.DOM.__track_lines__[156] = "pyjamas.DOM.py, line 156:\n    return createInputElement(\"text\")";
		pyjamas.DOM.__track_lines__[157] = "pyjamas.DOM.py, line 134:\n    def createInputCheck(): ... ";
		pyjamas.DOM.__track_lines__[158] = "pyjamas.DOM.py, line 158:\n    def createLabel():";
		pyjamas.DOM.__track_lines__[159] = "pyjamas.DOM.py, line 159:\n    return createElement(\"label\")";
		pyjamas.DOM.__track_lines__[672] = "pyjamas.DOM.py, line 672:\n    def setCapture(elem):";
		pyjamas.DOM.__track_lines__[161] = "pyjamas.DOM.py, line 161:\n    def createLegend():";
		pyjamas.DOM.__track_lines__[162] = "pyjamas.DOM.py, line 162:\n    return createElement(\"legend\")";
		pyjamas.DOM.__track_lines__[675] = "pyjamas.DOM.py, line 673:\n    JS(\"\"\" ... \"\"\")";
		pyjamas.DOM.__track_lines__[164] = "pyjamas.DOM.py, line 164:\n    def createOptions():";
		pyjamas.DOM.__track_lines__[165] = "pyjamas.DOM.py, line 165:\n    return createElement(\"options\")";
		pyjamas.DOM.__track_lines__[167] = "pyjamas.DOM.py, line 167:\n    def createSelect():";
		pyjamas.DOM.__track_lines__[168] = "pyjamas.DOM.py, line 168:\n    return createElement(\"select\")";
		pyjamas.DOM.__track_lines__[170] = "pyjamas.DOM.py, line 170:\n    def createSpan():";
		pyjamas.DOM.__track_lines__[171] = "pyjamas.DOM.py, line 171:\n    return createElement(\"span\")";
		pyjamas.DOM.__track_lines__[172] = "pyjamas.DOM.py, line 160:\n     ... ";
		pyjamas.DOM.__track_lines__[173] = "pyjamas.DOM.py, line 173:\n    def createTable():";
		pyjamas.DOM.__track_lines__[174] = "pyjamas.DOM.py, line 174:\n    return createElement(\"table\")";
		pyjamas.DOM.__track_lines__[176] = "pyjamas.DOM.py, line 176:\n    def createTBody():";
		pyjamas.DOM.__track_lines__[177] = "pyjamas.DOM.py, line 177:\n    return createElement(\"tbody\")";
		pyjamas.DOM.__track_lines__[179] = "pyjamas.DOM.py, line 179:\n    def createTD():";
		pyjamas.DOM.__track_lines__[180] = "pyjamas.DOM.py, line 180:\n    return createElement(\"td\")";
		pyjamas.DOM.__track_lines__[798] = "pyjamas.DOM.py, line 798:\n    def eventGetCurrentEvent():";
		pyjamas.DOM.__track_lines__[182] = "pyjamas.DOM.py, line 182:\n    def createTextArea():";
		pyjamas.DOM.__track_lines__[183] = "pyjamas.DOM.py, line 183:\n    return createElement(\"textarea\")";
		pyjamas.DOM.__track_lines__[696] = "pyjamas.DOM.py, line 696:\n    def setInnerText(elem, text):";
		pyjamas.DOM.__track_lines__[185] = "pyjamas.DOM.py, line 185:\n    def createTH():";
		pyjamas.DOM.__track_lines__[186] = "pyjamas.DOM.py, line 186:\n    return createElement(\"th\")";
		pyjamas.DOM.__track_lines__[188] = "pyjamas.DOM.py, line 188:\n    def createTR():";
		pyjamas.DOM.__track_lines__[189] = "pyjamas.DOM.py, line 189:\n    return createElement(\"tr\")";
		pyjamas.DOM.__track_lines__[191] = "pyjamas.DOM.py, line 191:\n    def eventCancelBubble(evt, cancel):";
		pyjamas.DOM.__track_lines__[192] = "pyjamas.DOM.py, line 192:\n    evt.cancelBubble = cancel";
		pyjamas.DOM.__track_lines__[800] = "pyjamas.DOM.py, line 800:\n    return currentEvent";
		pyjamas.DOM.__track_lines__[194] = "pyjamas.DOM.py, line 194:\n    def eventGetAltKey(evt):";
		pyjamas.DOM.__track_lines__[197] = "pyjamas.DOM.py, line 195:\n    JS(\"\"\" ... \"\"\")";
		pyjamas.DOM.__track_lines__[199] = "pyjamas.DOM.py, line 15:\n    from __pyjamas__ import JS ... def eventGetButton(evt):";
		pyjamas.DOM.__track_lines__[716] = "pyjamas.DOM.py, line 716:\n    def setOptionText(select, text, index):";
		pyjamas.DOM.__track_lines__[714] = "pyjamas.DOM.py, line 712:\n    JS(\"\"\" ... \"\"\")";
		pyjamas.DOM.__track_lines__[204] = "pyjamas.DOM.py, line 204:\n    def eventGetClientX(evt):";
		pyjamas.DOM.__track_lines__[207] = "pyjamas.DOM.py, line 205:\n    JS(\"\"\" ... \"\"\")";
		pyjamas.DOM.__track_lines__[720] = "pyjamas.DOM.py, line 717:\n    JS(\"\"\" ... \"\"\")";
		pyjamas.DOM.__track_lines__[209] = "pyjamas.DOM.py, line 209:\n    def eventGetClientY(evt):";
		pyjamas.DOM.__track_lines__[722] = "pyjamas.DOM.py, line 722:\n    def setStyleAttribute(element, name, value):";
		pyjamas.DOM.__track_lines__[803] = "pyjamas.DOM.py, line 803:\n    option = createElement(\"OPTION\")";
		pyjamas.DOM.__track_lines__[212] = "pyjamas.DOM.py, line 210:\n    JS(\"\"\" ... \"\"\")";
		pyjamas.DOM.__track_lines__[725] = "pyjamas.DOM.py, line 723:\n    JS(\"\"\" ... \"\"\")";
		pyjamas.DOM.__track_lines__[214] = "pyjamas.DOM.py, line 214:\n    def eventGetCtrlKey(evt):";
		pyjamas.DOM.__track_lines__[727] = "pyjamas.DOM.py, line 727:\n    def sinkEvents(element, bits):";
		pyjamas.DOM.__track_lines__[217] = "pyjamas.DOM.py, line 215:\n    JS(\"\"\" ... \"\"\")";
		pyjamas.DOM.__track_lines__[219] = "pyjamas.DOM.py, line 219:\n    def eventGetFromElement(evt):";
		pyjamas.DOM.__track_lines__[222] = "pyjamas.DOM.py, line 220:\n    JS(\"\"\" ... \"\"\")";
		pyjamas.DOM.__track_lines__[224] = "pyjamas.DOM.py, line 224:\n    def eventGetKeyCode(evt):";
		pyjamas.DOM.__track_lines__[227] = "pyjamas.DOM.py, line 225:\n    JS(\"\"\" ... \"\"\")";
		pyjamas.DOM.__track_lines__[229] = "pyjamas.DOM.py, line 229:\n    def eventGetRepeat(evt):";
		pyjamas.DOM.__track_lines__[232] = "pyjamas.DOM.py, line 230:\n    JS(\"\"\" ... \"\"\")";
		pyjamas.DOM.__track_lines__[234] = "pyjamas.DOM.py, line 234:\n    def eventGetScreenX(evt):";
		pyjamas.DOM.__track_lines__[237] = "pyjamas.DOM.py, line 235:\n    JS(\"\"\" ... \"\"\")";
		pyjamas.DOM.__track_lines__[239] = "pyjamas.DOM.py, line 239:\n    def eventGetScreenY(evt):";
		pyjamas.DOM.__track_lines__[242] = "pyjamas.DOM.py, line 240:\n    JS(\"\"\" ... \"\"\")";
		pyjamas.DOM.__track_lines__[755] = "pyjamas.DOM.py, line 734:\n    JS(\"\"\" ... \"\"\")";
		pyjamas.DOM.__track_lines__[244] = "pyjamas.DOM.py, line 244:\n    def eventGetShiftKey(evt):";
		pyjamas.DOM.__track_lines__[757] = "pyjamas.DOM.py, line 757:\n    def toString(elem):";
		pyjamas.DOM.__track_lines__[247] = "pyjamas.DOM.py, line 245:\n    JS(\"\"\" ... \"\"\")";
		pyjamas.DOM.__track_lines__[249] = "pyjamas.DOM.py, line 249:\n    def eventGetTarget(event):";
		pyjamas.DOM.__track_lines__[252] = "pyjamas.DOM.py, line 250:\n    JS(\"\"\" ... \"\"\")";
		pyjamas.DOM.__track_lines__[765] = "pyjamas.DOM.py, line 758:\n    JS(\"\"\" ... \"\"\")";
		pyjamas.DOM.__track_lines__[254] = "pyjamas.DOM.py, line 254:\n    def eventGetToElement(evt):";
		pyjamas.DOM.__track_lines__[768] = "pyjamas.DOM.py, line 768:\n    def dispatchEvent(event, element, listener):";
		pyjamas.DOM.__track_lines__[257] = "pyjamas.DOM.py, line 255:\n    JS(\"\"\" ... \"\"\")";
		pyjamas.DOM.__track_lines__[259] = "pyjamas.DOM.py, line 259:\n    def eventGetType(event):";
		pyjamas.DOM.__track_lines__[772] = "pyjamas.DOM.py, line 772:\n    global sEventPreviewStack";
		pyjamas.DOM.__track_lines__[773] = "pyjamas.DOM.py, line 773:\n    ret = True";
		pyjamas.DOM.__track_lines__[262] = "pyjamas.DOM.py, line 260:\n    JS(\"\"\" ... \"\"\")";
		pyjamas.DOM.__track_lines__[775] = "pyjamas.DOM.py, line 775:\n    preview = sEventPreviewStack[len(sEventPreviewStack) - 1]";
		pyjamas.DOM.__track_lines__[264] = "pyjamas.DOM.py, line 264:\n    def eventGetTypeInt(event):";
		pyjamas.DOM.__track_lines__[777] = "pyjamas.DOM.py, line 777:\n    ret = preview.onEventPreview(evt)";
		pyjamas.DOM.__track_lines__[778] = "pyjamas.DOM.py, line 778:\n    if not ret:";
		pyjamas.DOM.__track_lines__[779] = "pyjamas.DOM.py, line 779:\n    eventCancelBubble(evt, True)";
		pyjamas.DOM.__track_lines__[780] = "pyjamas.DOM.py, line 780:\n    eventPreventDefault(evt)";
		pyjamas.DOM.__track_lines__[704] = "pyjamas.DOM.py, line 697:\n    JS(\"\"\" ... \"\"\")";
		pyjamas.DOM.__track_lines__[782] = "pyjamas.DOM.py, line 782:\n    return ret";
		pyjamas.DOM.__track_lines__[785] = "pyjamas.DOM.py, line 785:\n    def dispatchEventAndCatch(evt, elem, listener, handler):";
		pyjamas.DOM.__track_lines__[786] = "pyjamas.DOM.py, line 786:\n    pass";
		pyjamas.DOM.__track_lines__[788] = "pyjamas.DOM.py, line 788:\n    def dispatchEventImpl(event, element, listener):";
		pyjamas.DOM.__track_lines__[789] = "pyjamas.DOM.py, line 789:\n    global sCaptureElem, currentEvent";
		pyjamas.DOM.__track_lines__[790] = "pyjamas.DOM.py, line 790:\n    if element == sCaptureElem:";
		pyjamas.DOM.__track_lines__[670] = "pyjamas.DOM.py, line 668:\n    JS(\"\"\" ... \"\"\")";
		pyjamas.DOM.__track_lines__[792] = "pyjamas.DOM.py, line 792:\n    sCaptureElem = None";
		pyjamas.DOM.__track_lines__[793] = "pyjamas.DOM.py, line 793:\n    prevCurrentEvent = currentEvent";
		pyjamas.DOM.__track_lines__[794] = "pyjamas.DOM.py, line 794:\n    currentEvent = event";
		pyjamas.DOM.__track_lines__[795] = "pyjamas.DOM.py, line 795:\n    listener.onBrowserEvent(event)";
		pyjamas.DOM.__track_lines__[796] = "pyjamas.DOM.py, line 796:\n    currentEvent = prevCurrentEvent";
		pyjamas.DOM.__track_lines__[286] = "pyjamas.DOM.py, line 265:\n    JS(\"\"\" ... \"\"\")";
		pyjamas.DOM.__track_lines__[799] = "pyjamas.DOM.py, line 799:\n    global currentEvent";
		pyjamas.DOM.__track_lines__[288] = "pyjamas.DOM.py, line 288:\n    def eventGetTypeString(event):";
		pyjamas.DOM.__track_lines__[289] = "pyjamas.DOM.py, line 289:\n    return eventGetType(event)";
		pyjamas.DOM.__track_lines__[802] = "pyjamas.DOM.py, line 802:\n    def insertListItem(select, item, value, index):";
		pyjamas.DOM.__track_lines__[291] = "pyjamas.DOM.py, line 291:\n    def eventPreventDefault(evt):";
		pyjamas.DOM.__track_lines__[292] = "pyjamas.DOM.py, line 292:\n    evt.preventDefault()";
		pyjamas.DOM.__track_lines__[805] = "pyjamas.DOM.py, line 805:\n    if value != None:";
		pyjamas.DOM.__track_lines__[294] = "pyjamas.DOM.py, line 294:\n    def eventSetKeyCode(evt, key):";
		pyjamas.DOM.__track_lines__[807] = "pyjamas.DOM.py, line 807:\n    if index == -1:";
		pyjamas.DOM.__track_lines__[808] = "pyjamas.DOM.py, line 808:\n    appendChild(select, option)";
		pyjamas.DOM.__track_lines__[297] = "pyjamas.DOM.py, line 295:\n    JS(\"\"\" ... \"\"\")";
		pyjamas.DOM.__track_lines__[810] = "pyjamas.DOM.py, line 810:\n    insertChild(select, option, index)";
		pyjamas.DOM.__track_lines__[299] = "pyjamas.DOM.py, line 299:\n    def eventToString(evt):";
		pyjamas.DOM.__track_lines__[302] = "pyjamas.DOM.py, line 300:\n    JS(\"\"\" ... \"\"\")";
		pyjamas.DOM.__track_lines__[304] = "pyjamas.DOM.py, line 304:\n    def iframeGetSrc(elem):";
		pyjamas.DOM.__track_lines__[709] = "pyjamas.DOM.py, line 707:\n    JS(\"\"\" ... \"\"\")";
		pyjamas.DOM.__track_lines__[307] = "pyjamas.DOM.py, line 305:\n    JS(\"\"\" ... \"\"\")";
		pyjamas.DOM.__track_lines__[309] = "pyjamas.DOM.py, line 49:\n    if (!evt.relatedTarget) { ... def getAbsoluteLeft(elem):";
		pyjamas.DOM.__track_lines__[319] = "pyjamas.DOM.py, line 95:\n    def appendChild(parent, child): ... def getAbsoluteTop(elem):";
		pyjamas.DOM.__track_lines__[329] = "pyjamas.DOM.py, line 329:\n    def getAttribute(elem, attr):";
		pyjamas.DOM.__track_lines__[333] = "pyjamas.DOM.py, line 330:\n    JS(\"\"\" ... \"\"\")";
		pyjamas.DOM.__track_lines__[335] = "pyjamas.DOM.py, line 335:\n    def getBooleanAttribute(elem, attr):";
		pyjamas.DOM.__track_lines__[338] = "pyjamas.DOM.py, line 336:\n    JS(\"\"\" ... \"\"\")";
		pyjamas.DOM.__track_lines__[340] = "pyjamas.DOM.py, line 340:\n    def getCaptureElement():";
		pyjamas.DOM.__track_lines__[341] = "pyjamas.DOM.py, line 341:\n    global sCaptureElem";
		pyjamas.DOM.__track_lines__[342] = "pyjamas.DOM.py, line 342:\n    return sCaptureElem";
		pyjamas.DOM.__track_lines__[344] = "pyjamas.DOM.py, line 344:\n    def getChild(elem, index):";
		pyjamas.DOM.__track_lines__[657] = "pyjamas.DOM.py, line 657:\n    def removeAttribute(element, attribute):";
		pyjamas.DOM.__track_lines__[361] = "pyjamas.DOM.py, line 348:\n    JS(\"\"\" ... \"\"\")";
		pyjamas.DOM.__track_lines__[363] = "pyjamas.DOM.py, line 363:\n    def getChildCount(elem):";
		pyjamas.DOM.__track_lines__[711] = "pyjamas.DOM.py, line 711:\n    def setIntStyleAttribute(elem, attr, value):";
		pyjamas.DOM.__track_lines__[677] = "pyjamas.DOM.py, line 677:\n    def setEventListener(element, listener):";
		pyjamas.DOM.__track_lines__[376] = "pyjamas.DOM.py, line 368:\n    JS(\"\"\" ... \"\"\")";
		pyjamas.DOM.__track_lines__[378] = "pyjamas.DOM.py, line 114:\n    def createDiv(): ... def getChildIndex(parent, toFind):";
		pyjamas.DOM.__track_lines__[814] = "pyjamas.DOM.py, line 814:\n    init()";
		pyjamas.DOM.__track_lines__[397] = "pyjamas.DOM.py, line 397:\n    def getElementById(id):";
		pyjamas.DOM.__track_lines__[404] = "pyjamas.DOM.py, line 401:\n    JS(\"\"\" ... \"\"\")";
		pyjamas.DOM.__track_lines__[406] = "pyjamas.DOM.py, line 406:\n    def getEventListener(element):";
		pyjamas.DOM.__track_lines__[665] = "pyjamas.DOM.py, line 663:\n    JS(\"\"\" ... \"\"\")";
		pyjamas.DOM.__track_lines__[412] = "pyjamas.DOM.py, line 410:\n    JS(\"\"\" ... \"\"\")";
		pyjamas.DOM.__track_lines__[414] = "pyjamas.DOM.py, line 414:\n    def getEventsSunk(element):";
		pyjamas.DOM.__track_lines__[667] = "pyjamas.DOM.py, line 667:\n    def setBooleanAttribute(elem, attr, value):";
		pyjamas.DOM.__track_lines__[421] = "pyjamas.DOM.py, line 419:\n    JS(\"\"\" ... \"\"\")";
		pyjamas.DOM.__track_lines__[423] = "pyjamas.DOM.py, line 423:\n    def getFirstChild(elem):";
		pyjamas.DOM.__track_lines__[429] = "pyjamas.DOM.py, line 424:\n    JS(\"\"\" ... \"\"\")";
		pyjamas.DOM.__track_lines__[431] = "pyjamas.DOM.py, line 431:\n    def getInnerHTML(element):";
		pyjamas.DOM.__track_lines__[435] = "pyjamas.DOM.py, line 432:\n    JS(\"\"\" ... \"\"\")";
		pyjamas.DOM.__track_lines__[437] = "pyjamas.DOM.py, line 437:\n    def getInnerText(element):";
		pyjamas.DOM.__track_lines__[771] = "pyjamas.DOM.py, line 771:\n    def previewEvent(evt):";
		pyjamas.DOM.__track_lines__[451] = "pyjamas.DOM.py, line 438:\n    JS(\"\"\" ... \"\"\")";
		pyjamas.DOM.__track_lines__[453] = "pyjamas.DOM.py, line 453:\n    def getIntAttribute(elem, attr):";
		pyjamas.DOM.__track_lines__[460] = "pyjamas.DOM.py, line 454:\n    JS(\"\"\" ... \"\"\")";
		pyjamas.DOM.__track_lines__[462] = "pyjamas.DOM.py, line 462:\n    def getIntStyleAttribute(elem, attr):";
		pyjamas.DOM.__track_lines__[612] = "pyjamas.DOM.py, line 610:\n    JS(\"\"\" ... \"\"\")";
		pyjamas.DOM.__track_lines__[469] = "pyjamas.DOM.py, line 463:\n    JS(\"\"\" ... \"\"\")";
		pyjamas.DOM.__track_lines__[471] = "pyjamas.DOM.py, line 471:\n    def getNextSibling(elem):";
		pyjamas.DOM.__track_lines__[477] = "pyjamas.DOM.py, line 472:\n    JS(\"\"\" ... \"\"\")";
		pyjamas.DOM.__track_lines__[479] = "pyjamas.DOM.py, line 479:\n    def getParent(elem):";
		pyjamas.DOM.__track_lines__[806] = "pyjamas.DOM.py, line 806:\n    setAttribute(option, \"value\", value)";
		pyjamas.DOM.__track_lines__[488] = "pyjamas.DOM.py, line 480:\n    JS(\"\"\" ... \"\"\")";
		pyjamas.DOM.__track_lines__[490] = "pyjamas.DOM.py, line 490:\n    def getStyleAttribute(elem, attr):";
		pyjamas.DOM.__track_lines__[494] = "pyjamas.DOM.py, line 491:\n    JS(\"\"\" ... \"\"\")";
		pyjamas.DOM.__track_lines__[496] = "pyjamas.DOM.py, line 496:\n    def insertChild(parent, toAdd, index):";
		pyjamas.DOM.__track_lines__[511] = "pyjamas.DOM.py, line 497:\n    JS(\"\"\" ... \"\"\")";
	try {
		track.module='pyjamas.DOM';
		track.lineno=1;
		track.lineno=15;
		track.lineno=17;
		pyjamas.DOM.sCaptureElem = null;
		track.lineno=18;
		pyjamas.DOM.sEventPreviewStack = new pyjslib.List([]);
		track.lineno=19;
		pyjamas.DOM.currentEvent = null;
		track.lineno=21;
		pyjamas.DOM.init = function() {
			if (pyjs_options.arg_count && arguments.length != 0) pyjs__exception_func_param(arguments.callee.__name__, 0, 0, arguments.length);

    // Set up capture event dispatchers.
    $wnd.__dispatchCapturedMouseEvent = function(evt) {
        if ($wnd.__dispatchCapturedEvent(evt)) {
            var cap = DOM.getCaptureElement();
            if (cap && cap.__listener) {
                DOM.dispatchEvent(evt, cap, cap.__listener);
                evt.stopPropagation();
            }
        }
    };

    $wnd.__dispatchCapturedEvent = function(evt) {
        if (!DOM.previewEvent(evt)) {
            evt.stopPropagation();
            evt.preventDefault();
            return false;
        }

        return true;
        };

    $wnd.addEventListener(
        'mouseout',
        function(evt){
            var cap = DOM.getCaptureElement();
            if (cap) {
                if (!evt.relatedTarget) {
                    // When the mouse leaves the window during capture, release capture
                    // and synthesize an 'onlosecapture' event.
                    DOM.sCaptureElem = null;
                    if (cap.__listener) {
                        var lcEvent = $doc.createEvent('UIEvent');
                        lcEvent.initUIEvent('losecapture', false, false, $wnd, 0);
                        DOM.dispatchEvent(lcEvent, cap, cap.__listener);
                    }
                }
            }
        },
        true
    );


    $wnd.addEventListener('click', $wnd.__dispatchCapturedMouseEvent, true);
    $wnd.addEventListener('dblclick', $wnd.__dispatchCapturedMouseEvent, true);
    $wnd.addEventListener('mousedown', $wnd.__dispatchCapturedMouseEvent, true);
    $wnd.addEventListener('mouseup', $wnd.__dispatchCapturedMouseEvent, true);
    $wnd.addEventListener('mousemove', $wnd.__dispatchCapturedMouseEvent, true);
    $wnd.addEventListener('keydown', $wnd.__dispatchCapturedEvent, true);
    $wnd.addEventListener('keyup', $wnd.__dispatchCapturedEvent, true);
    $wnd.addEventListener('keypress', $wnd.__dispatchCapturedEvent, true);
    
    $wnd.__dispatchEvent = function(evt) {
    
        var listener, curElem = this;
        
        while (curElem && !(listener = curElem.__listener)) {
            curElem = curElem.parentNode;
        }
        if (curElem && curElem.nodeType != 1) {
            curElem = null;
        }
    
        if (listener) {
            DOM.dispatchEvent(evt, curElem, listener);
        }
    };
    
		};
		pyjamas.DOM.init.__name__ = 'init';

		pyjamas.DOM.init.parse_kwargs = function ( __kwargs ) {
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('pyjamas.DOM.init', i);
				}
			}
			var __r = [];
			for (var pyjs__va_arg = 1;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		};
		track.lineno=91;
		pyjamas.DOM.addEventPreview = function(preview) {
			if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length);
			track={module:'pyjamas.DOM',lineno:91};trackstack.push(track);
			track.module='pyjamas.DOM';
			track.lineno=91;
			track.lineno=92;
			track.lineno=93;
			pyjamas.DOM.sEventPreviewStack.append(preview);
			trackstack.pop();track=trackstack.pop();trackstack.push(track);
			return null;
		};
		pyjamas.DOM.addEventPreview.__name__ = 'addEventPreview';

		pyjamas.DOM.addEventPreview.parse_kwargs = function ( __kwargs, preview ) {
			if (typeof preview == 'undefined') {
				preview=__kwargs.preview;
				delete __kwargs.preview;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.preview != 'undefined') {
				pyjs__exception_func_multiple_values('pyjamas.DOM.addEventPreview', 'preview');
			}
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('pyjamas.DOM.addEventPreview', i);
				}
			}
			var __r = [preview];
			for (var pyjs__va_arg = 2;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		};
		track.lineno=95;
		pyjamas.DOM.appendChild = function(parent, child) {
			if (pyjs_options.arg_count && arguments.length != 2) pyjs__exception_func_param(arguments.callee.__name__, 2, 2, arguments.length);
			track={module:'pyjamas.DOM',lineno:95};trackstack.push(track);
			track.module='pyjamas.DOM';
			track.lineno=95;
			track.lineno=98;

    parent.appendChild(child);
    
			trackstack.pop();track=trackstack.pop();trackstack.push(track);
		};
		pyjamas.DOM.appendChild.__name__ = 'appendChild';

		pyjamas.DOM.appendChild.parse_kwargs = function ( __kwargs, parent, child ) {
			if (typeof parent == 'undefined') {
				parent=__kwargs.parent;
				delete __kwargs.parent;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.parent != 'undefined') {
				pyjs__exception_func_multiple_values('pyjamas.DOM.appendChild', 'parent');
			}
			if (typeof child == 'undefined') {
				child=__kwargs.child;
				delete __kwargs.child;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.child != 'undefined') {
				pyjs__exception_func_multiple_values('pyjamas.DOM.appendChild', 'child');
			}
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('pyjamas.DOM.appendChild', i);
				}
			}
			var __r = [parent, child];
			for (var pyjs__va_arg = 3;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		};
		track.lineno=100;
		pyjamas.DOM.compare = function(elem1, elem2) {
			if (pyjs_options.arg_count && arguments.length != 2) pyjs__exception_func_param(arguments.callee.__name__, 2, 2, arguments.length);

    if (!elem1 && !elem2) {
        return true;
    } else if (!elem1 || !elem2) {
        return false;
    }
	if (!elem1.isSameNode) {
		return (elem1 == elem2);
	}
    return (elem1.isSameNode(elem2));
    
		};
		pyjamas.DOM.compare.__name__ = 'compare';

		pyjamas.DOM.compare.parse_kwargs = function ( __kwargs, elem1, elem2 ) {
			if (typeof elem1 == 'undefined') {
				elem1=__kwargs.elem1;
				delete __kwargs.elem1;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.elem1 != 'undefined') {
				pyjs__exception_func_multiple_values('pyjamas.DOM.compare', 'elem1');
			}
			if (typeof elem2 == 'undefined') {
				elem2=__kwargs.elem2;
				delete __kwargs.elem2;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.elem2 != 'undefined') {
				pyjs__exception_func_multiple_values('pyjamas.DOM.compare', 'elem2');
			}
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('pyjamas.DOM.compare', i);
				}
			}
			var __r = [elem1, elem2];
			for (var pyjs__va_arg = 3;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		};
		track.lineno=105;
		pyjamas.DOM.createAnchor = function() {
			if (pyjs_options.arg_count && arguments.length != 0) pyjs__exception_func_param(arguments.callee.__name__, 0, 0, arguments.length);
			track={module:'pyjamas.DOM',lineno:105};trackstack.push(track);
			track.module='pyjamas.DOM';
			track.lineno=105;
			track.lineno=106;
			track.lineno=106;
			var pyjs__ret = pyjamas.DOM.createElement(String('A'));
			trackstack.pop();track=trackstack.pop();trackstack.push(track);
			return pyjs__ret;
		};
		pyjamas.DOM.createAnchor.__name__ = 'createAnchor';

		pyjamas.DOM.createAnchor.parse_kwargs = function ( __kwargs ) {
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('pyjamas.DOM.createAnchor', i);
				}
			}
			var __r = [];
			for (var pyjs__va_arg = 1;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		};
		track.lineno=108;
		pyjamas.DOM.createButton = function() {
			if (pyjs_options.arg_count && arguments.length != 0) pyjs__exception_func_param(arguments.callee.__name__, 0, 0, arguments.length);
			track={module:'pyjamas.DOM',lineno:108};trackstack.push(track);
			track.module='pyjamas.DOM';
			track.lineno=108;
			track.lineno=109;
			track.lineno=109;
			var pyjs__ret = pyjamas.DOM.createElement(String('button'));
			trackstack.pop();track=trackstack.pop();trackstack.push(track);
			return pyjs__ret;
		};
		pyjamas.DOM.createButton.__name__ = 'createButton';

		pyjamas.DOM.createButton.parse_kwargs = function ( __kwargs ) {
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('pyjamas.DOM.createButton', i);
				}
			}
			var __r = [];
			for (var pyjs__va_arg = 1;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		};
		track.lineno=111;
		pyjamas.DOM.createCol = function() {
			if (pyjs_options.arg_count && arguments.length != 0) pyjs__exception_func_param(arguments.callee.__name__, 0, 0, arguments.length);
			track={module:'pyjamas.DOM',lineno:111};trackstack.push(track);
			track.module='pyjamas.DOM';
			track.lineno=111;
			track.lineno=112;
			track.lineno=112;
			var pyjs__ret = pyjamas.DOM.createElement(String('col'));
			trackstack.pop();track=trackstack.pop();trackstack.push(track);
			return pyjs__ret;
		};
		pyjamas.DOM.createCol.__name__ = 'createCol';

		pyjamas.DOM.createCol.parse_kwargs = function ( __kwargs ) {
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('pyjamas.DOM.createCol', i);
				}
			}
			var __r = [];
			for (var pyjs__va_arg = 1;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		};
		track.lineno=114;
		pyjamas.DOM.createDiv = function() {
			if (pyjs_options.arg_count && arguments.length != 0) pyjs__exception_func_param(arguments.callee.__name__, 0, 0, arguments.length);
			track={module:'pyjamas.DOM',lineno:114};trackstack.push(track);
			track.module='pyjamas.DOM';
			track.lineno=114;
			track.lineno=115;
			track.lineno=115;
			var pyjs__ret = pyjamas.DOM.createElement(String('div'));
			trackstack.pop();track=trackstack.pop();trackstack.push(track);
			return pyjs__ret;
		};
		pyjamas.DOM.createDiv.__name__ = 'createDiv';

		pyjamas.DOM.createDiv.parse_kwargs = function ( __kwargs ) {
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('pyjamas.DOM.createDiv', i);
				}
			}
			var __r = [];
			for (var pyjs__va_arg = 1;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		};
		track.lineno=117;
		pyjamas.DOM.createElement = function(tag) {
			if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length);

    return $doc.createElement(tag);
    
		};
		pyjamas.DOM.createElement.__name__ = 'createElement';

		pyjamas.DOM.createElement.parse_kwargs = function ( __kwargs, tag ) {
			if (typeof tag == 'undefined') {
				tag=__kwargs.tag;
				delete __kwargs.tag;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.tag != 'undefined') {
				pyjs__exception_func_multiple_values('pyjamas.DOM.createElement', 'tag');
			}
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('pyjamas.DOM.createElement', i);
				}
			}
			var __r = [tag];
			for (var pyjs__va_arg = 2;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		};
		track.lineno=122;
		pyjamas.DOM.createFieldSet = function() {
			if (pyjs_options.arg_count && arguments.length != 0) pyjs__exception_func_param(arguments.callee.__name__, 0, 0, arguments.length);
			track={module:'pyjamas.DOM',lineno:122};trackstack.push(track);
			track.module='pyjamas.DOM';
			track.lineno=122;
			track.lineno=123;
			track.lineno=123;
			var pyjs__ret = pyjamas.DOM.createElement(String('fieldset'));
			trackstack.pop();track=trackstack.pop();trackstack.push(track);
			return pyjs__ret;
		};
		pyjamas.DOM.createFieldSet.__name__ = 'createFieldSet';

		pyjamas.DOM.createFieldSet.parse_kwargs = function ( __kwargs ) {
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('pyjamas.DOM.createFieldSet', i);
				}
			}
			var __r = [];
			for (var pyjs__va_arg = 1;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		};
		track.lineno=125;
		pyjamas.DOM.createForm = function() {
			if (pyjs_options.arg_count && arguments.length != 0) pyjs__exception_func_param(arguments.callee.__name__, 0, 0, arguments.length);
			track={module:'pyjamas.DOM',lineno:125};trackstack.push(track);
			track.module='pyjamas.DOM';
			track.lineno=125;
			track.lineno=126;
			track.lineno=126;
			var pyjs__ret = pyjamas.DOM.createElement(String('form'));
			trackstack.pop();track=trackstack.pop();trackstack.push(track);
			return pyjs__ret;
		};
		pyjamas.DOM.createForm.__name__ = 'createForm';

		pyjamas.DOM.createForm.parse_kwargs = function ( __kwargs ) {
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('pyjamas.DOM.createForm', i);
				}
			}
			var __r = [];
			for (var pyjs__va_arg = 1;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		};
		track.lineno=128;
		pyjamas.DOM.createIFrame = function() {
			if (pyjs_options.arg_count && arguments.length != 0) pyjs__exception_func_param(arguments.callee.__name__, 0, 0, arguments.length);
			track={module:'pyjamas.DOM',lineno:128};trackstack.push(track);
			track.module='pyjamas.DOM';
			track.lineno=128;
			track.lineno=129;
			track.lineno=129;
			var pyjs__ret = pyjamas.DOM.createElement(String('iframe'));
			trackstack.pop();track=trackstack.pop();trackstack.push(track);
			return pyjs__ret;
		};
		pyjamas.DOM.createIFrame.__name__ = 'createIFrame';

		pyjamas.DOM.createIFrame.parse_kwargs = function ( __kwargs ) {
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('pyjamas.DOM.createIFrame', i);
				}
			}
			var __r = [];
			for (var pyjs__va_arg = 1;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		};
		track.lineno=131;
		pyjamas.DOM.createImg = function() {
			if (pyjs_options.arg_count && arguments.length != 0) pyjs__exception_func_param(arguments.callee.__name__, 0, 0, arguments.length);
			track={module:'pyjamas.DOM',lineno:131};trackstack.push(track);
			track.module='pyjamas.DOM';
			track.lineno=131;
			track.lineno=132;
			track.lineno=132;
			var pyjs__ret = pyjamas.DOM.createElement(String('img'));
			trackstack.pop();track=trackstack.pop();trackstack.push(track);
			return pyjs__ret;
		};
		pyjamas.DOM.createImg.__name__ = 'createImg';

		pyjamas.DOM.createImg.parse_kwargs = function ( __kwargs ) {
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('pyjamas.DOM.createImg', i);
				}
			}
			var __r = [];
			for (var pyjs__va_arg = 1;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		};
		track.lineno=134;
		pyjamas.DOM.createInputCheck = function() {
			if (pyjs_options.arg_count && arguments.length != 0) pyjs__exception_func_param(arguments.callee.__name__, 0, 0, arguments.length);
			track={module:'pyjamas.DOM',lineno:134};trackstack.push(track);
			track.module='pyjamas.DOM';
			track.lineno=134;
			track.lineno=135;
			track.lineno=135;
			var pyjs__ret = pyjamas.DOM.createInputElement(String('checkbox'));
			trackstack.pop();track=trackstack.pop();trackstack.push(track);
			return pyjs__ret;
		};
		pyjamas.DOM.createInputCheck.__name__ = 'createInputCheck';

		pyjamas.DOM.createInputCheck.parse_kwargs = function ( __kwargs ) {
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('pyjamas.DOM.createInputCheck', i);
				}
			}
			var __r = [];
			for (var pyjs__va_arg = 1;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		};
		track.lineno=137;
		pyjamas.DOM.createInputElement = function(elementType) {
			if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length);

    var e = $doc.createElement("INPUT");
    e.type = elementType;
    return e;
    
		};
		pyjamas.DOM.createInputElement.__name__ = 'createInputElement';

		pyjamas.DOM.createInputElement.parse_kwargs = function ( __kwargs, elementType ) {
			if (typeof elementType == 'undefined') {
				elementType=__kwargs.elementType;
				delete __kwargs.elementType;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.elementType != 'undefined') {
				pyjs__exception_func_multiple_values('pyjamas.DOM.createInputElement', 'elementType');
			}
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('pyjamas.DOM.createInputElement', i);
				}
			}
			var __r = [elementType];
			for (var pyjs__va_arg = 2;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		};
		track.lineno=144;
		pyjamas.DOM.createInputPassword = function() {
			if (pyjs_options.arg_count && arguments.length != 0) pyjs__exception_func_param(arguments.callee.__name__, 0, 0, arguments.length);
			track={module:'pyjamas.DOM',lineno:144};trackstack.push(track);
			track.module='pyjamas.DOM';
			track.lineno=144;
			track.lineno=145;
			track.lineno=145;
			var pyjs__ret = pyjamas.DOM.createInputElement(String('password'));
			trackstack.pop();track=trackstack.pop();trackstack.push(track);
			return pyjs__ret;
		};
		pyjamas.DOM.createInputPassword.__name__ = 'createInputPassword';

		pyjamas.DOM.createInputPassword.parse_kwargs = function ( __kwargs ) {
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('pyjamas.DOM.createInputPassword', i);
				}
			}
			var __r = [];
			for (var pyjs__va_arg = 1;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		};
		track.lineno=147;
		pyjamas.DOM.createInputRadio = function(group) {
			if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length);

    var elem = $doc.createElement("INPUT");
    elem.type = 'radio';
    elem.name = group;
    return elem;
    
		};
		pyjamas.DOM.createInputRadio.__name__ = 'createInputRadio';

		pyjamas.DOM.createInputRadio.parse_kwargs = function ( __kwargs, group ) {
			if (typeof group == 'undefined') {
				group=__kwargs.group;
				delete __kwargs.group;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.group != 'undefined') {
				pyjs__exception_func_multiple_values('pyjamas.DOM.createInputRadio', 'group');
			}
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('pyjamas.DOM.createInputRadio', i);
				}
			}
			var __r = [group];
			for (var pyjs__va_arg = 2;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		};
		track.lineno=155;
		pyjamas.DOM.createInputText = function() {
			if (pyjs_options.arg_count && arguments.length != 0) pyjs__exception_func_param(arguments.callee.__name__, 0, 0, arguments.length);
			track={module:'pyjamas.DOM',lineno:155};trackstack.push(track);
			track.module='pyjamas.DOM';
			track.lineno=155;
			track.lineno=156;
			track.lineno=156;
			var pyjs__ret = pyjamas.DOM.createInputElement(String('text'));
			trackstack.pop();track=trackstack.pop();trackstack.push(track);
			return pyjs__ret;
		};
		pyjamas.DOM.createInputText.__name__ = 'createInputText';

		pyjamas.DOM.createInputText.parse_kwargs = function ( __kwargs ) {
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('pyjamas.DOM.createInputText', i);
				}
			}
			var __r = [];
			for (var pyjs__va_arg = 1;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		};
		track.lineno=158;
		pyjamas.DOM.createLabel = function() {
			if (pyjs_options.arg_count && arguments.length != 0) pyjs__exception_func_param(arguments.callee.__name__, 0, 0, arguments.length);
			track={module:'pyjamas.DOM',lineno:158};trackstack.push(track);
			track.module='pyjamas.DOM';
			track.lineno=158;
			track.lineno=159;
			track.lineno=159;
			var pyjs__ret = pyjamas.DOM.createElement(String('label'));
			trackstack.pop();track=trackstack.pop();trackstack.push(track);
			return pyjs__ret;
		};
		pyjamas.DOM.createLabel.__name__ = 'createLabel';

		pyjamas.DOM.createLabel.parse_kwargs = function ( __kwargs ) {
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('pyjamas.DOM.createLabel', i);
				}
			}
			var __r = [];
			for (var pyjs__va_arg = 1;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		};
		track.lineno=161;
		pyjamas.DOM.createLegend = function() {
			if (pyjs_options.arg_count && arguments.length != 0) pyjs__exception_func_param(arguments.callee.__name__, 0, 0, arguments.length);
			track={module:'pyjamas.DOM',lineno:161};trackstack.push(track);
			track.module='pyjamas.DOM';
			track.lineno=161;
			track.lineno=162;
			track.lineno=162;
			var pyjs__ret = pyjamas.DOM.createElement(String('legend'));
			trackstack.pop();track=trackstack.pop();trackstack.push(track);
			return pyjs__ret;
		};
		pyjamas.DOM.createLegend.__name__ = 'createLegend';

		pyjamas.DOM.createLegend.parse_kwargs = function ( __kwargs ) {
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('pyjamas.DOM.createLegend', i);
				}
			}
			var __r = [];
			for (var pyjs__va_arg = 1;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		};
		track.lineno=164;
		pyjamas.DOM.createOptions = function() {
			if (pyjs_options.arg_count && arguments.length != 0) pyjs__exception_func_param(arguments.callee.__name__, 0, 0, arguments.length);
			track={module:'pyjamas.DOM',lineno:164};trackstack.push(track);
			track.module='pyjamas.DOM';
			track.lineno=164;
			track.lineno=165;
			track.lineno=165;
			var pyjs__ret = pyjamas.DOM.createElement(String('options'));
			trackstack.pop();track=trackstack.pop();trackstack.push(track);
			return pyjs__ret;
		};
		pyjamas.DOM.createOptions.__name__ = 'createOptions';

		pyjamas.DOM.createOptions.parse_kwargs = function ( __kwargs ) {
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('pyjamas.DOM.createOptions', i);
				}
			}
			var __r = [];
			for (var pyjs__va_arg = 1;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		};
		track.lineno=167;
		pyjamas.DOM.createSelect = function() {
			if (pyjs_options.arg_count && arguments.length != 0) pyjs__exception_func_param(arguments.callee.__name__, 0, 0, arguments.length);
			track={module:'pyjamas.DOM',lineno:167};trackstack.push(track);
			track.module='pyjamas.DOM';
			track.lineno=167;
			track.lineno=168;
			track.lineno=168;
			var pyjs__ret = pyjamas.DOM.createElement(String('select'));
			trackstack.pop();track=trackstack.pop();trackstack.push(track);
			return pyjs__ret;
		};
		pyjamas.DOM.createSelect.__name__ = 'createSelect';

		pyjamas.DOM.createSelect.parse_kwargs = function ( __kwargs ) {
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('pyjamas.DOM.createSelect', i);
				}
			}
			var __r = [];
			for (var pyjs__va_arg = 1;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		};
		track.lineno=170;
		pyjamas.DOM.createSpan = function() {
			if (pyjs_options.arg_count && arguments.length != 0) pyjs__exception_func_param(arguments.callee.__name__, 0, 0, arguments.length);
			track={module:'pyjamas.DOM',lineno:170};trackstack.push(track);
			track.module='pyjamas.DOM';
			track.lineno=170;
			track.lineno=171;
			track.lineno=171;
			var pyjs__ret = pyjamas.DOM.createElement(String('span'));
			trackstack.pop();track=trackstack.pop();trackstack.push(track);
			return pyjs__ret;
		};
		pyjamas.DOM.createSpan.__name__ = 'createSpan';

		pyjamas.DOM.createSpan.parse_kwargs = function ( __kwargs ) {
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('pyjamas.DOM.createSpan', i);
				}
			}
			var __r = [];
			for (var pyjs__va_arg = 1;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		};
		track.lineno=173;
		pyjamas.DOM.createTable = function() {
			if (pyjs_options.arg_count && arguments.length != 0) pyjs__exception_func_param(arguments.callee.__name__, 0, 0, arguments.length);
			track={module:'pyjamas.DOM',lineno:173};trackstack.push(track);
			track.module='pyjamas.DOM';
			track.lineno=173;
			track.lineno=174;
			track.lineno=174;
			var pyjs__ret = pyjamas.DOM.createElement(String('table'));
			trackstack.pop();track=trackstack.pop();trackstack.push(track);
			return pyjs__ret;
		};
		pyjamas.DOM.createTable.__name__ = 'createTable';

		pyjamas.DOM.createTable.parse_kwargs = function ( __kwargs ) {
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('pyjamas.DOM.createTable', i);
				}
			}
			var __r = [];
			for (var pyjs__va_arg = 1;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		};
		track.lineno=176;
		pyjamas.DOM.createTBody = function() {
			if (pyjs_options.arg_count && arguments.length != 0) pyjs__exception_func_param(arguments.callee.__name__, 0, 0, arguments.length);
			track={module:'pyjamas.DOM',lineno:176};trackstack.push(track);
			track.module='pyjamas.DOM';
			track.lineno=176;
			track.lineno=177;
			track.lineno=177;
			var pyjs__ret = pyjamas.DOM.createElement(String('tbody'));
			trackstack.pop();track=trackstack.pop();trackstack.push(track);
			return pyjs__ret;
		};
		pyjamas.DOM.createTBody.__name__ = 'createTBody';

		pyjamas.DOM.createTBody.parse_kwargs = function ( __kwargs ) {
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('pyjamas.DOM.createTBody', i);
				}
			}
			var __r = [];
			for (var pyjs__va_arg = 1;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		};
		track.lineno=179;
		pyjamas.DOM.createTD = function() {
			if (pyjs_options.arg_count && arguments.length != 0) pyjs__exception_func_param(arguments.callee.__name__, 0, 0, arguments.length);
			track={module:'pyjamas.DOM',lineno:179};trackstack.push(track);
			track.module='pyjamas.DOM';
			track.lineno=179;
			track.lineno=180;
			track.lineno=180;
			var pyjs__ret = pyjamas.DOM.createElement(String('td'));
			trackstack.pop();track=trackstack.pop();trackstack.push(track);
			return pyjs__ret;
		};
		pyjamas.DOM.createTD.__name__ = 'createTD';

		pyjamas.DOM.createTD.parse_kwargs = function ( __kwargs ) {
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('pyjamas.DOM.createTD', i);
				}
			}
			var __r = [];
			for (var pyjs__va_arg = 1;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		};
		track.lineno=182;
		pyjamas.DOM.createTextArea = function() {
			if (pyjs_options.arg_count && arguments.length != 0) pyjs__exception_func_param(arguments.callee.__name__, 0, 0, arguments.length);
			track={module:'pyjamas.DOM',lineno:182};trackstack.push(track);
			track.module='pyjamas.DOM';
			track.lineno=182;
			track.lineno=183;
			track.lineno=183;
			var pyjs__ret = pyjamas.DOM.createElement(String('textarea'));
			trackstack.pop();track=trackstack.pop();trackstack.push(track);
			return pyjs__ret;
		};
		pyjamas.DOM.createTextArea.__name__ = 'createTextArea';

		pyjamas.DOM.createTextArea.parse_kwargs = function ( __kwargs ) {
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('pyjamas.DOM.createTextArea', i);
				}
			}
			var __r = [];
			for (var pyjs__va_arg = 1;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		};
		track.lineno=185;
		pyjamas.DOM.createTH = function() {
			if (pyjs_options.arg_count && arguments.length != 0) pyjs__exception_func_param(arguments.callee.__name__, 0, 0, arguments.length);
			track={module:'pyjamas.DOM',lineno:185};trackstack.push(track);
			track.module='pyjamas.DOM';
			track.lineno=185;
			track.lineno=186;
			track.lineno=186;
			var pyjs__ret = pyjamas.DOM.createElement(String('th'));
			trackstack.pop();track=trackstack.pop();trackstack.push(track);
			return pyjs__ret;
		};
		pyjamas.DOM.createTH.__name__ = 'createTH';

		pyjamas.DOM.createTH.parse_kwargs = function ( __kwargs ) {
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('pyjamas.DOM.createTH', i);
				}
			}
			var __r = [];
			for (var pyjs__va_arg = 1;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		};
		track.lineno=188;
		pyjamas.DOM.createTR = function() {
			if (pyjs_options.arg_count && arguments.length != 0) pyjs__exception_func_param(arguments.callee.__name__, 0, 0, arguments.length);
			track={module:'pyjamas.DOM',lineno:188};trackstack.push(track);
			track.module='pyjamas.DOM';
			track.lineno=188;
			track.lineno=189;
			track.lineno=189;
			var pyjs__ret = pyjamas.DOM.createElement(String('tr'));
			trackstack.pop();track=trackstack.pop();trackstack.push(track);
			return pyjs__ret;
		};
		pyjamas.DOM.createTR.__name__ = 'createTR';

		pyjamas.DOM.createTR.parse_kwargs = function ( __kwargs ) {
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('pyjamas.DOM.createTR', i);
				}
			}
			var __r = [];
			for (var pyjs__va_arg = 1;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		};
		track.lineno=191;
		pyjamas.DOM.eventCancelBubble = function(evt, cancel) {
			if (pyjs_options.arg_count && arguments.length != 2) pyjs__exception_func_param(arguments.callee.__name__, 2, 2, arguments.length);
			track={module:'pyjamas.DOM',lineno:191};trackstack.push(track);
			track.module='pyjamas.DOM';
			track.lineno=191;
			track.lineno=192;
			evt.cancelBubble = cancel;
			trackstack.pop();track=trackstack.pop();trackstack.push(track);
			return null;
		};
		pyjamas.DOM.eventCancelBubble.__name__ = 'eventCancelBubble';

		pyjamas.DOM.eventCancelBubble.parse_kwargs = function ( __kwargs, evt, cancel ) {
			if (typeof evt == 'undefined') {
				evt=__kwargs.evt;
				delete __kwargs.evt;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.evt != 'undefined') {
				pyjs__exception_func_multiple_values('pyjamas.DOM.eventCancelBubble', 'evt');
			}
			if (typeof cancel == 'undefined') {
				cancel=__kwargs.cancel;
				delete __kwargs.cancel;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.cancel != 'undefined') {
				pyjs__exception_func_multiple_values('pyjamas.DOM.eventCancelBubble', 'cancel');
			}
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('pyjamas.DOM.eventCancelBubble', i);
				}
			}
			var __r = [evt, cancel];
			for (var pyjs__va_arg = 3;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		};
		track.lineno=194;
		pyjamas.DOM.eventGetAltKey = function(evt) {
			if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length);

    return evt.altKey;
    
		};
		pyjamas.DOM.eventGetAltKey.__name__ = 'eventGetAltKey';

		pyjamas.DOM.eventGetAltKey.parse_kwargs = function ( __kwargs, evt ) {
			if (typeof evt == 'undefined') {
				evt=__kwargs.evt;
				delete __kwargs.evt;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.evt != 'undefined') {
				pyjs__exception_func_multiple_values('pyjamas.DOM.eventGetAltKey', 'evt');
			}
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('pyjamas.DOM.eventGetAltKey', i);
				}
			}
			var __r = [evt];
			for (var pyjs__va_arg = 2;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		};
		track.lineno=199;
		pyjamas.DOM.eventGetButton = function(evt) {
			if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length);

    var button = evt.button;
    if(button == 0) {
        return 1;
    } else if (button == 1) {
        return 4;
    } else {
        return button;
    }
    
		};
		pyjamas.DOM.eventGetButton.__name__ = 'eventGetButton';

		pyjamas.DOM.eventGetButton.parse_kwargs = function ( __kwargs, evt ) {
			if (typeof evt == 'undefined') {
				evt=__kwargs.evt;
				delete __kwargs.evt;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.evt != 'undefined') {
				pyjs__exception_func_multiple_values('pyjamas.DOM.eventGetButton', 'evt');
			}
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('pyjamas.DOM.eventGetButton', i);
				}
			}
			var __r = [evt];
			for (var pyjs__va_arg = 2;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		};
		track.lineno=204;
		pyjamas.DOM.eventGetClientX = function(evt) {
			if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length);

    return evt.clientX;
    
		};
		pyjamas.DOM.eventGetClientX.__name__ = 'eventGetClientX';

		pyjamas.DOM.eventGetClientX.parse_kwargs = function ( __kwargs, evt ) {
			if (typeof evt == 'undefined') {
				evt=__kwargs.evt;
				delete __kwargs.evt;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.evt != 'undefined') {
				pyjs__exception_func_multiple_values('pyjamas.DOM.eventGetClientX', 'evt');
			}
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('pyjamas.DOM.eventGetClientX', i);
				}
			}
			var __r = [evt];
			for (var pyjs__va_arg = 2;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		};
		track.lineno=209;
		pyjamas.DOM.eventGetClientY = function(evt) {
			if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length);

    return evt.clientY;
    
		};
		pyjamas.DOM.eventGetClientY.__name__ = 'eventGetClientY';

		pyjamas.DOM.eventGetClientY.parse_kwargs = function ( __kwargs, evt ) {
			if (typeof evt == 'undefined') {
				evt=__kwargs.evt;
				delete __kwargs.evt;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.evt != 'undefined') {
				pyjs__exception_func_multiple_values('pyjamas.DOM.eventGetClientY', 'evt');
			}
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('pyjamas.DOM.eventGetClientY', i);
				}
			}
			var __r = [evt];
			for (var pyjs__va_arg = 2;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		};
		track.lineno=214;
		pyjamas.DOM.eventGetCtrlKey = function(evt) {
			if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length);

    return evt.ctrlKey;
    
		};
		pyjamas.DOM.eventGetCtrlKey.__name__ = 'eventGetCtrlKey';

		pyjamas.DOM.eventGetCtrlKey.parse_kwargs = function ( __kwargs, evt ) {
			if (typeof evt == 'undefined') {
				evt=__kwargs.evt;
				delete __kwargs.evt;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.evt != 'undefined') {
				pyjs__exception_func_multiple_values('pyjamas.DOM.eventGetCtrlKey', 'evt');
			}
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('pyjamas.DOM.eventGetCtrlKey', i);
				}
			}
			var __r = [evt];
			for (var pyjs__va_arg = 2;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		};
		track.lineno=219;
		pyjamas.DOM.eventGetFromElement = function(evt) {
			if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length);

    return evt.fromElement ? evt.fromElement : null;
    
		};
		pyjamas.DOM.eventGetFromElement.__name__ = 'eventGetFromElement';

		pyjamas.DOM.eventGetFromElement.parse_kwargs = function ( __kwargs, evt ) {
			if (typeof evt == 'undefined') {
				evt=__kwargs.evt;
				delete __kwargs.evt;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.evt != 'undefined') {
				pyjs__exception_func_multiple_values('pyjamas.DOM.eventGetFromElement', 'evt');
			}
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('pyjamas.DOM.eventGetFromElement', i);
				}
			}
			var __r = [evt];
			for (var pyjs__va_arg = 2;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		};
		track.lineno=224;
		pyjamas.DOM.eventGetKeyCode = function(evt) {
			if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length);

    return evt.which ? evt.which : evt.keyCode;
    
		};
		pyjamas.DOM.eventGetKeyCode.__name__ = 'eventGetKeyCode';

		pyjamas.DOM.eventGetKeyCode.parse_kwargs = function ( __kwargs, evt ) {
			if (typeof evt == 'undefined') {
				evt=__kwargs.evt;
				delete __kwargs.evt;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.evt != 'undefined') {
				pyjs__exception_func_multiple_values('pyjamas.DOM.eventGetKeyCode', 'evt');
			}
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('pyjamas.DOM.eventGetKeyCode', i);
				}
			}
			var __r = [evt];
			for (var pyjs__va_arg = 2;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		};
		track.lineno=229;
		pyjamas.DOM.eventGetRepeat = function(evt) {
			if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length);

    return evt.repeat;
    
		};
		pyjamas.DOM.eventGetRepeat.__name__ = 'eventGetRepeat';

		pyjamas.DOM.eventGetRepeat.parse_kwargs = function ( __kwargs, evt ) {
			if (typeof evt == 'undefined') {
				evt=__kwargs.evt;
				delete __kwargs.evt;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.evt != 'undefined') {
				pyjs__exception_func_multiple_values('pyjamas.DOM.eventGetRepeat', 'evt');
			}
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('pyjamas.DOM.eventGetRepeat', i);
				}
			}
			var __r = [evt];
			for (var pyjs__va_arg = 2;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		};
		track.lineno=234;
		pyjamas.DOM.eventGetScreenX = function(evt) {
			if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length);

    return evt.screenX;
    
		};
		pyjamas.DOM.eventGetScreenX.__name__ = 'eventGetScreenX';

		pyjamas.DOM.eventGetScreenX.parse_kwargs = function ( __kwargs, evt ) {
			if (typeof evt == 'undefined') {
				evt=__kwargs.evt;
				delete __kwargs.evt;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.evt != 'undefined') {
				pyjs__exception_func_multiple_values('pyjamas.DOM.eventGetScreenX', 'evt');
			}
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('pyjamas.DOM.eventGetScreenX', i);
				}
			}
			var __r = [evt];
			for (var pyjs__va_arg = 2;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		};
		track.lineno=239;
		pyjamas.DOM.eventGetScreenY = function(evt) {
			if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length);

    return evt.screenY;
    
		};
		pyjamas.DOM.eventGetScreenY.__name__ = 'eventGetScreenY';

		pyjamas.DOM.eventGetScreenY.parse_kwargs = function ( __kwargs, evt ) {
			if (typeof evt == 'undefined') {
				evt=__kwargs.evt;
				delete __kwargs.evt;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.evt != 'undefined') {
				pyjs__exception_func_multiple_values('pyjamas.DOM.eventGetScreenY', 'evt');
			}
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('pyjamas.DOM.eventGetScreenY', i);
				}
			}
			var __r = [evt];
			for (var pyjs__va_arg = 2;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		};
		track.lineno=244;
		pyjamas.DOM.eventGetShiftKey = function(evt) {
			if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length);

    return evt.shiftKey;
    
		};
		pyjamas.DOM.eventGetShiftKey.__name__ = 'eventGetShiftKey';

		pyjamas.DOM.eventGetShiftKey.parse_kwargs = function ( __kwargs, evt ) {
			if (typeof evt == 'undefined') {
				evt=__kwargs.evt;
				delete __kwargs.evt;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.evt != 'undefined') {
				pyjs__exception_func_multiple_values('pyjamas.DOM.eventGetShiftKey', 'evt');
			}
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('pyjamas.DOM.eventGetShiftKey', i);
				}
			}
			var __r = [evt];
			for (var pyjs__va_arg = 2;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		};
		track.lineno=249;
		pyjamas.DOM.eventGetTarget = function(event) {
			if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length);

    return event.target ? event.target : null;
    
		};
		pyjamas.DOM.eventGetTarget.__name__ = 'eventGetTarget';

		pyjamas.DOM.eventGetTarget.parse_kwargs = function ( __kwargs, event ) {
			if (typeof event == 'undefined') {
				event=__kwargs.event;
				delete __kwargs.event;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.event != 'undefined') {
				pyjs__exception_func_multiple_values('pyjamas.DOM.eventGetTarget', 'event');
			}
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('pyjamas.DOM.eventGetTarget', i);
				}
			}
			var __r = [event];
			for (var pyjs__va_arg = 2;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		};
		track.lineno=254;
		pyjamas.DOM.eventGetToElement = function(evt) {
			if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length);

    return evt.relatedTarget ? evt.relatedTarget : null;
    
		};
		pyjamas.DOM.eventGetToElement.__name__ = 'eventGetToElement';

		pyjamas.DOM.eventGetToElement.parse_kwargs = function ( __kwargs, evt ) {
			if (typeof evt == 'undefined') {
				evt=__kwargs.evt;
				delete __kwargs.evt;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.evt != 'undefined') {
				pyjs__exception_func_multiple_values('pyjamas.DOM.eventGetToElement', 'evt');
			}
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('pyjamas.DOM.eventGetToElement', i);
				}
			}
			var __r = [evt];
			for (var pyjs__va_arg = 2;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		};
		track.lineno=259;
		pyjamas.DOM.eventGetType = function(event) {
			if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length);

    return event.type;
    
		};
		pyjamas.DOM.eventGetType.__name__ = 'eventGetType';

		pyjamas.DOM.eventGetType.parse_kwargs = function ( __kwargs, event ) {
			if (typeof event == 'undefined') {
				event=__kwargs.event;
				delete __kwargs.event;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.event != 'undefined') {
				pyjs__exception_func_multiple_values('pyjamas.DOM.eventGetType', 'event');
			}
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('pyjamas.DOM.eventGetType', i);
				}
			}
			var __r = [event];
			for (var pyjs__va_arg = 2;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		};
		track.lineno=264;
		pyjamas.DOM.eventGetTypeInt = function(event) {
			if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length);

    switch (event.type) {
      case "blur": return 0x01000;
      case "change": return 0x00400;
      case "click": return 0x00001;
      case "dblclick": return 0x00002;
      case "focus": return 0x00800;
      case "keydown": return 0x00080;
      case "keypress": return 0x00100;
      case "keyup": return 0x00200;
      case "load": return 0x08000;
      case "losecapture": return 0x02000;
      case "mousedown": return 0x00004;
      case "mousemove": return 0x00040;
      case "mouseout": return 0x00020;
      case "mouseover": return 0x00010;
      case "mouseup": return 0x00008;
      case "scroll": return 0x04000;
      case "error": return 0x10000;
      case "contextmenu": return 0x20000;
    }
    
		};
		pyjamas.DOM.eventGetTypeInt.__name__ = 'eventGetTypeInt';

		pyjamas.DOM.eventGetTypeInt.parse_kwargs = function ( __kwargs, event ) {
			if (typeof event == 'undefined') {
				event=__kwargs.event;
				delete __kwargs.event;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.event != 'undefined') {
				pyjs__exception_func_multiple_values('pyjamas.DOM.eventGetTypeInt', 'event');
			}
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('pyjamas.DOM.eventGetTypeInt', i);
				}
			}
			var __r = [event];
			for (var pyjs__va_arg = 2;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		};
		track.lineno=288;
		pyjamas.DOM.eventGetTypeString = function(event) {
			if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length);
			track={module:'pyjamas.DOM',lineno:288};trackstack.push(track);
			track.module='pyjamas.DOM';
			track.lineno=288;
			track.lineno=289;
			track.lineno=289;
			var pyjs__ret = pyjamas.DOM.eventGetType(event);
			trackstack.pop();track=trackstack.pop();trackstack.push(track);
			return pyjs__ret;
		};
		pyjamas.DOM.eventGetTypeString.__name__ = 'eventGetTypeString';

		pyjamas.DOM.eventGetTypeString.parse_kwargs = function ( __kwargs, event ) {
			if (typeof event == 'undefined') {
				event=__kwargs.event;
				delete __kwargs.event;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.event != 'undefined') {
				pyjs__exception_func_multiple_values('pyjamas.DOM.eventGetTypeString', 'event');
			}
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('pyjamas.DOM.eventGetTypeString', i);
				}
			}
			var __r = [event];
			for (var pyjs__va_arg = 2;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		};
		track.lineno=291;
		pyjamas.DOM.eventPreventDefault = function(evt) {
			if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length);
			track={module:'pyjamas.DOM',lineno:291};trackstack.push(track);
			track.module='pyjamas.DOM';
			track.lineno=291;
			track.lineno=292;
			evt.preventDefault();
			trackstack.pop();track=trackstack.pop();trackstack.push(track);
			return null;
		};
		pyjamas.DOM.eventPreventDefault.__name__ = 'eventPreventDefault';

		pyjamas.DOM.eventPreventDefault.parse_kwargs = function ( __kwargs, evt ) {
			if (typeof evt == 'undefined') {
				evt=__kwargs.evt;
				delete __kwargs.evt;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.evt != 'undefined') {
				pyjs__exception_func_multiple_values('pyjamas.DOM.eventPreventDefault', 'evt');
			}
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('pyjamas.DOM.eventPreventDefault', i);
				}
			}
			var __r = [evt];
			for (var pyjs__va_arg = 2;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		};
		track.lineno=294;
		pyjamas.DOM.eventSetKeyCode = function(evt, key) {
			if (pyjs_options.arg_count && arguments.length != 2) pyjs__exception_func_param(arguments.callee.__name__, 2, 2, arguments.length);
			track={module:'pyjamas.DOM',lineno:294};trackstack.push(track);
			track.module='pyjamas.DOM';
			track.lineno=294;
			track.lineno=297;

    evt.keyCode = key;
    
			trackstack.pop();track=trackstack.pop();trackstack.push(track);
		};
		pyjamas.DOM.eventSetKeyCode.__name__ = 'eventSetKeyCode';

		pyjamas.DOM.eventSetKeyCode.parse_kwargs = function ( __kwargs, evt, key ) {
			if (typeof evt == 'undefined') {
				evt=__kwargs.evt;
				delete __kwargs.evt;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.evt != 'undefined') {
				pyjs__exception_func_multiple_values('pyjamas.DOM.eventSetKeyCode', 'evt');
			}
			if (typeof key == 'undefined') {
				key=__kwargs.key;
				delete __kwargs.key;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.key != 'undefined') {
				pyjs__exception_func_multiple_values('pyjamas.DOM.eventSetKeyCode', 'key');
			}
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('pyjamas.DOM.eventSetKeyCode', i);
				}
			}
			var __r = [evt, key];
			for (var pyjs__va_arg = 3;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		};
		track.lineno=299;
		pyjamas.DOM.eventToString = function(evt) {
			if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length);

    return evt.toString();
    
		};
		pyjamas.DOM.eventToString.__name__ = 'eventToString';

		pyjamas.DOM.eventToString.parse_kwargs = function ( __kwargs, evt ) {
			if (typeof evt == 'undefined') {
				evt=__kwargs.evt;
				delete __kwargs.evt;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.evt != 'undefined') {
				pyjs__exception_func_multiple_values('pyjamas.DOM.eventToString', 'evt');
			}
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('pyjamas.DOM.eventToString', i);
				}
			}
			var __r = [evt];
			for (var pyjs__va_arg = 2;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		};
		track.lineno=304;
		pyjamas.DOM.iframeGetSrc = function(elem) {
			if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length);

    return elem.src;
    
		};
		pyjamas.DOM.iframeGetSrc.__name__ = 'iframeGetSrc';

		pyjamas.DOM.iframeGetSrc.parse_kwargs = function ( __kwargs, elem ) {
			if (typeof elem == 'undefined') {
				elem=__kwargs.elem;
				delete __kwargs.elem;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.elem != 'undefined') {
				pyjs__exception_func_multiple_values('pyjamas.DOM.iframeGetSrc', 'elem');
			}
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('pyjamas.DOM.iframeGetSrc', i);
				}
			}
			var __r = [elem];
			for (var pyjs__va_arg = 2;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		};
		track.lineno=309;
		pyjamas.DOM.getAbsoluteLeft = function(elem) {
			if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length);

    try {
        // Firefox 3 expects getBoundingClientRect
        // getBoundingClientRect can be float: 73.1 instead of 74, see
        // gwt's workaround at user/src/com/google/gwt/dom/client/DOMImplMozilla.java:47
        // Please note, their implementation has 1px offset.

        var left = Math.ceil(elem.getBoundingClientRect().left);
    } catch (e) {
        var left = $doc.getBoxObjectFor(elem).x;
    }
    var parent = elem.parentNode;

    while (parent) {
        if (parent.scrollLeft > 0) {
            left = left -  parent.scrollLeft;
        }
        parent = parent.parentNode;
    }

    return left + $doc.body.scrollLeft + $doc.documentElement.scrollLeft;
    
		};
		pyjamas.DOM.getAbsoluteLeft.__name__ = 'getAbsoluteLeft';

		pyjamas.DOM.getAbsoluteLeft.parse_kwargs = function ( __kwargs, elem ) {
			if (typeof elem == 'undefined') {
				elem=__kwargs.elem;
				delete __kwargs.elem;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.elem != 'undefined') {
				pyjs__exception_func_multiple_values('pyjamas.DOM.getAbsoluteLeft', 'elem');
			}
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('pyjamas.DOM.getAbsoluteLeft', i);
				}
			}
			var __r = [elem];
			for (var pyjs__va_arg = 2;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		};
		track.lineno=319;
		pyjamas.DOM.getAbsoluteTop = function(elem) {
			if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length);

    try {
        // Firefox 3 expects getBoundingClientRect
        var top = Math.ceil(elem.getBoundingClientRect().top);
    } catch (e) {
        var top = $doc.getBoxObjectFor(elem).y;
    }
    var parent = elem.parentNode;
    while (parent) {
        if (parent.scrollTop > 0) {
            top -= parent.scrollTop;
        }
        parent = parent.parentNode;
    }

    return top + $doc.body.scrollTop + $doc.documentElement.scrollTop;
    
		};
		pyjamas.DOM.getAbsoluteTop.__name__ = 'getAbsoluteTop';

		pyjamas.DOM.getAbsoluteTop.parse_kwargs = function ( __kwargs, elem ) {
			if (typeof elem == 'undefined') {
				elem=__kwargs.elem;
				delete __kwargs.elem;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.elem != 'undefined') {
				pyjs__exception_func_multiple_values('pyjamas.DOM.getAbsoluteTop', 'elem');
			}
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('pyjamas.DOM.getAbsoluteTop', i);
				}
			}
			var __r = [elem];
			for (var pyjs__va_arg = 2;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		};
		track.lineno=329;
		pyjamas.DOM.getAttribute = function(elem, attr) {
			if (pyjs_options.arg_count && arguments.length != 2) pyjs__exception_func_param(arguments.callee.__name__, 2, 2, arguments.length);

    var ret = elem[attr];
    return (ret == null) ? null : String(ret);
    
		};
		pyjamas.DOM.getAttribute.__name__ = 'getAttribute';

		pyjamas.DOM.getAttribute.parse_kwargs = function ( __kwargs, elem, attr ) {
			if (typeof elem == 'undefined') {
				elem=__kwargs.elem;
				delete __kwargs.elem;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.elem != 'undefined') {
				pyjs__exception_func_multiple_values('pyjamas.DOM.getAttribute', 'elem');
			}
			if (typeof attr == 'undefined') {
				attr=__kwargs.attr;
				delete __kwargs.attr;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.attr != 'undefined') {
				pyjs__exception_func_multiple_values('pyjamas.DOM.getAttribute', 'attr');
			}
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('pyjamas.DOM.getAttribute', i);
				}
			}
			var __r = [elem, attr];
			for (var pyjs__va_arg = 3;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		};
		track.lineno=335;
		pyjamas.DOM.getBooleanAttribute = function(elem, attr) {
			if (pyjs_options.arg_count && arguments.length != 2) pyjs__exception_func_param(arguments.callee.__name__, 2, 2, arguments.length);

    return !!elem[attr];
    
		};
		pyjamas.DOM.getBooleanAttribute.__name__ = 'getBooleanAttribute';

		pyjamas.DOM.getBooleanAttribute.parse_kwargs = function ( __kwargs, elem, attr ) {
			if (typeof elem == 'undefined') {
				elem=__kwargs.elem;
				delete __kwargs.elem;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.elem != 'undefined') {
				pyjs__exception_func_multiple_values('pyjamas.DOM.getBooleanAttribute', 'elem');
			}
			if (typeof attr == 'undefined') {
				attr=__kwargs.attr;
				delete __kwargs.attr;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.attr != 'undefined') {
				pyjs__exception_func_multiple_values('pyjamas.DOM.getBooleanAttribute', 'attr');
			}
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('pyjamas.DOM.getBooleanAttribute', i);
				}
			}
			var __r = [elem, attr];
			for (var pyjs__va_arg = 3;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		};
		track.lineno=340;
		pyjamas.DOM.getCaptureElement = function() {
			if (pyjs_options.arg_count && arguments.length != 0) pyjs__exception_func_param(arguments.callee.__name__, 0, 0, arguments.length);
			track={module:'pyjamas.DOM',lineno:340};trackstack.push(track);
			track.module='pyjamas.DOM';
			track.lineno=340;
			track.lineno=341;
			track.lineno=342;
			track.lineno=342;
			var pyjs__ret = pyjamas.DOM.sCaptureElem;
			trackstack.pop();track=trackstack.pop();trackstack.push(track);
			return pyjs__ret;
		};
		pyjamas.DOM.getCaptureElement.__name__ = 'getCaptureElement';

		pyjamas.DOM.getCaptureElement.parse_kwargs = function ( __kwargs ) {
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('pyjamas.DOM.getCaptureElement', i);
				}
			}
			var __r = [];
			for (var pyjs__va_arg = 1;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		};
		track.lineno=344;
		pyjamas.DOM.getChild = function(elem, index) {
			if (pyjs_options.arg_count && arguments.length != 2) pyjs__exception_func_param(arguments.callee.__name__, 2, 2, arguments.length);

    var count = 0, child = elem.firstChild;
    while (child) {
      var next = child.nextSibling;
      if (child.nodeType == 1) {
        if (index == count)
          return child;
        ++count;
      }
      child = next;
    }

    return null;
    
		};
		pyjamas.DOM.getChild.__name__ = 'getChild';

		pyjamas.DOM.getChild.parse_kwargs = function ( __kwargs, elem, index ) {
			if (typeof elem == 'undefined') {
				elem=__kwargs.elem;
				delete __kwargs.elem;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.elem != 'undefined') {
				pyjs__exception_func_multiple_values('pyjamas.DOM.getChild', 'elem');
			}
			if (typeof index == 'undefined') {
				index=__kwargs.index;
				delete __kwargs.index;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.index != 'undefined') {
				pyjs__exception_func_multiple_values('pyjamas.DOM.getChild', 'index');
			}
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('pyjamas.DOM.getChild', i);
				}
			}
			var __r = [elem, index];
			for (var pyjs__va_arg = 3;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		};
		track.lineno=363;
		pyjamas.DOM.getChildCount = function(elem) {
			if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length);

    var count = 0, child = elem.firstChild;
    while (child) {
      if (child.nodeType == 1)
      ++count;
      child = child.nextSibling;
    }
    return count;
    
		};
		pyjamas.DOM.getChildCount.__name__ = 'getChildCount';

		pyjamas.DOM.getChildCount.parse_kwargs = function ( __kwargs, elem ) {
			if (typeof elem == 'undefined') {
				elem=__kwargs.elem;
				delete __kwargs.elem;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.elem != 'undefined') {
				pyjs__exception_func_multiple_values('pyjamas.DOM.getChildCount', 'elem');
			}
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('pyjamas.DOM.getChildCount', i);
				}
			}
			var __r = [elem];
			for (var pyjs__va_arg = 2;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		};
		track.lineno=378;
		pyjamas.DOM.getChildIndex = function(parent, child) {
			if (pyjs_options.arg_count && arguments.length != 2) pyjs__exception_func_param(arguments.callee.__name__, 2, 2, arguments.length);

    var count = 0, current = parent.firstChild;
    while (current) {
		if (! current.isSameNode) {
			if (current == child) {
			return count;
			}
		}
		else if (current.isSameNode(child)) {
            return count;
        }
        if (current.nodeType == 1) {
            ++count;
        }
        current = current.nextSibling;
    }
    return -1;
    
		};
		pyjamas.DOM.getChildIndex.__name__ = 'getChildIndex';

		pyjamas.DOM.getChildIndex.parse_kwargs = function ( __kwargs, parent, child ) {
			if (typeof parent == 'undefined') {
				parent=__kwargs.parent;
				delete __kwargs.parent;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.parent != 'undefined') {
				pyjs__exception_func_multiple_values('pyjamas.DOM.getChildIndex', 'parent');
			}
			if (typeof child == 'undefined') {
				child=__kwargs.child;
				delete __kwargs.child;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.child != 'undefined') {
				pyjs__exception_func_multiple_values('pyjamas.DOM.getChildIndex', 'child');
			}
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('pyjamas.DOM.getChildIndex', i);
				}
			}
			var __r = [parent, child];
			for (var pyjs__va_arg = 3;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		};
		track.lineno=397;
		pyjamas.DOM.getElementById = function(id) {
			if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length);

    var elem = $doc.getElementById(id);
    return elem ? elem : null;
    
		};
		pyjamas.DOM.getElementById.__name__ = 'getElementById';

		pyjamas.DOM.getElementById.parse_kwargs = function ( __kwargs, id ) {
			if (typeof id == 'undefined') {
				id=__kwargs.id;
				delete __kwargs.id;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.id != 'undefined') {
				pyjs__exception_func_multiple_values('pyjamas.DOM.getElementById', 'id');
			}
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('pyjamas.DOM.getElementById', i);
				}
			}
			var __r = [id];
			for (var pyjs__va_arg = 2;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		};
		track.lineno=406;
		pyjamas.DOM.getEventListener = function(element) {
			if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length);

    return element.__listener;
    
		};
		pyjamas.DOM.getEventListener.__name__ = 'getEventListener';

		pyjamas.DOM.getEventListener.parse_kwargs = function ( __kwargs, element ) {
			if (typeof element == 'undefined') {
				element=__kwargs.element;
				delete __kwargs.element;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.element != 'undefined') {
				pyjs__exception_func_multiple_values('pyjamas.DOM.getEventListener', 'element');
			}
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('pyjamas.DOM.getEventListener', i);
				}
			}
			var __r = [element];
			for (var pyjs__va_arg = 2;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		};
		track.lineno=414;
		pyjamas.DOM.getEventsSunk = function(element) {
			if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length);

    return element.__eventBits ? element.__eventBits : 0;
    
		};
		pyjamas.DOM.getEventsSunk.__name__ = 'getEventsSunk';

		pyjamas.DOM.getEventsSunk.parse_kwargs = function ( __kwargs, element ) {
			if (typeof element == 'undefined') {
				element=__kwargs.element;
				delete __kwargs.element;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.element != 'undefined') {
				pyjs__exception_func_multiple_values('pyjamas.DOM.getEventsSunk', 'element');
			}
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('pyjamas.DOM.getEventsSunk', i);
				}
			}
			var __r = [element];
			for (var pyjs__va_arg = 2;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		};
		track.lineno=423;
		pyjamas.DOM.getFirstChild = function(elem) {
			if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length);

    var child = elem.firstChild;
    while (child && child.nodeType != 1)
      child = child.nextSibling;
    return child ? child : null;
    
		};
		pyjamas.DOM.getFirstChild.__name__ = 'getFirstChild';

		pyjamas.DOM.getFirstChild.parse_kwargs = function ( __kwargs, elem ) {
			if (typeof elem == 'undefined') {
				elem=__kwargs.elem;
				delete __kwargs.elem;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.elem != 'undefined') {
				pyjs__exception_func_multiple_values('pyjamas.DOM.getFirstChild', 'elem');
			}
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('pyjamas.DOM.getFirstChild', i);
				}
			}
			var __r = [elem];
			for (var pyjs__va_arg = 2;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		};
		track.lineno=431;
		pyjamas.DOM.getInnerHTML = function(element) {
			if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length);

    var ret = element.innerHTML;
    return (ret == null) ? null : ret;
    
		};
		pyjamas.DOM.getInnerHTML.__name__ = 'getInnerHTML';

		pyjamas.DOM.getInnerHTML.parse_kwargs = function ( __kwargs, element ) {
			if (typeof element == 'undefined') {
				element=__kwargs.element;
				delete __kwargs.element;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.element != 'undefined') {
				pyjs__exception_func_multiple_values('pyjamas.DOM.getInnerHTML', 'element');
			}
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('pyjamas.DOM.getInnerHTML', i);
				}
			}
			var __r = [element];
			for (var pyjs__va_arg = 2;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		};
		track.lineno=437;
		pyjamas.DOM.getInnerText = function(element) {
			if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length);

    // To mimic IE's 'innerText' property in the W3C DOM, we need to recursively
    // concatenate all child text nodes (depth first).
    var text = '', child = element.firstChild;
    while (child) {
      if (child.nodeType == 1){ // 1 == Element node
        text += DOM.getInnerText(child);
      } else if (child.nodeValue) {
        text += child.nodeValue;
      }
      child = child.nextSibling;
    }
    return text;
    
		};
		pyjamas.DOM.getInnerText.__name__ = 'getInnerText';

		pyjamas.DOM.getInnerText.parse_kwargs = function ( __kwargs, element ) {
			if (typeof element == 'undefined') {
				element=__kwargs.element;
				delete __kwargs.element;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.element != 'undefined') {
				pyjs__exception_func_multiple_values('pyjamas.DOM.getInnerText', 'element');
			}
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('pyjamas.DOM.getInnerText', i);
				}
			}
			var __r = [element];
			for (var pyjs__va_arg = 2;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		};
		track.lineno=453;
		pyjamas.DOM.getIntAttribute = function(elem, attr) {
			if (pyjs_options.arg_count && arguments.length != 2) pyjs__exception_func_param(arguments.callee.__name__, 2, 2, arguments.length);

    var i = parseInt(elem[attr]);
    if (!i) {
        return 0;
    }
    return i;
    
		};
		pyjamas.DOM.getIntAttribute.__name__ = 'getIntAttribute';

		pyjamas.DOM.getIntAttribute.parse_kwargs = function ( __kwargs, elem, attr ) {
			if (typeof elem == 'undefined') {
				elem=__kwargs.elem;
				delete __kwargs.elem;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.elem != 'undefined') {
				pyjs__exception_func_multiple_values('pyjamas.DOM.getIntAttribute', 'elem');
			}
			if (typeof attr == 'undefined') {
				attr=__kwargs.attr;
				delete __kwargs.attr;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.attr != 'undefined') {
				pyjs__exception_func_multiple_values('pyjamas.DOM.getIntAttribute', 'attr');
			}
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('pyjamas.DOM.getIntAttribute', i);
				}
			}
			var __r = [elem, attr];
			for (var pyjs__va_arg = 3;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		};
		track.lineno=462;
		pyjamas.DOM.getIntStyleAttribute = function(elem, attr) {
			if (pyjs_options.arg_count && arguments.length != 2) pyjs__exception_func_param(arguments.callee.__name__, 2, 2, arguments.length);

    var i = parseInt(elem.style[attr]);
    if (!i) {
        return 0;
    }
    return i;
    
		};
		pyjamas.DOM.getIntStyleAttribute.__name__ = 'getIntStyleAttribute';

		pyjamas.DOM.getIntStyleAttribute.parse_kwargs = function ( __kwargs, elem, attr ) {
			if (typeof elem == 'undefined') {
				elem=__kwargs.elem;
				delete __kwargs.elem;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.elem != 'undefined') {
				pyjs__exception_func_multiple_values('pyjamas.DOM.getIntStyleAttribute', 'elem');
			}
			if (typeof attr == 'undefined') {
				attr=__kwargs.attr;
				delete __kwargs.attr;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.attr != 'undefined') {
				pyjs__exception_func_multiple_values('pyjamas.DOM.getIntStyleAttribute', 'attr');
			}
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('pyjamas.DOM.getIntStyleAttribute', i);
				}
			}
			var __r = [elem, attr];
			for (var pyjs__va_arg = 3;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		};
		track.lineno=471;
		pyjamas.DOM.getNextSibling = function(elem) {
			if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length);

    var sib = elem.nextSibling;
    while (sib && sib.nodeType != 1)
      sib = sib.nextSibling;
    return sib ? sib : null;
    
		};
		pyjamas.DOM.getNextSibling.__name__ = 'getNextSibling';

		pyjamas.DOM.getNextSibling.parse_kwargs = function ( __kwargs, elem ) {
			if (typeof elem == 'undefined') {
				elem=__kwargs.elem;
				delete __kwargs.elem;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.elem != 'undefined') {
				pyjs__exception_func_multiple_values('pyjamas.DOM.getNextSibling', 'elem');
			}
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('pyjamas.DOM.getNextSibling', i);
				}
			}
			var __r = [elem];
			for (var pyjs__va_arg = 2;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		};
		track.lineno=479;
		pyjamas.DOM.getParent = function(elem) {
			if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length);

    var parent = elem.parentNode;
    if(parent == null) {
        return null;
    }
    if (parent.nodeType != 1)
        parent = null;
    return parent ? parent : null;
    
		};
		pyjamas.DOM.getParent.__name__ = 'getParent';

		pyjamas.DOM.getParent.parse_kwargs = function ( __kwargs, elem ) {
			if (typeof elem == 'undefined') {
				elem=__kwargs.elem;
				delete __kwargs.elem;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.elem != 'undefined') {
				pyjs__exception_func_multiple_values('pyjamas.DOM.getParent', 'elem');
			}
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('pyjamas.DOM.getParent', i);
				}
			}
			var __r = [elem];
			for (var pyjs__va_arg = 2;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		};
		track.lineno=490;
		pyjamas.DOM.getStyleAttribute = function(elem, attr) {
			if (pyjs_options.arg_count && arguments.length != 2) pyjs__exception_func_param(arguments.callee.__name__, 2, 2, arguments.length);

    var ret = elem.style[attr];
    return (ret == null) ? null : ret;
    
		};
		pyjamas.DOM.getStyleAttribute.__name__ = 'getStyleAttribute';

		pyjamas.DOM.getStyleAttribute.parse_kwargs = function ( __kwargs, elem, attr ) {
			if (typeof elem == 'undefined') {
				elem=__kwargs.elem;
				delete __kwargs.elem;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.elem != 'undefined') {
				pyjs__exception_func_multiple_values('pyjamas.DOM.getStyleAttribute', 'elem');
			}
			if (typeof attr == 'undefined') {
				attr=__kwargs.attr;
				delete __kwargs.attr;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.attr != 'undefined') {
				pyjs__exception_func_multiple_values('pyjamas.DOM.getStyleAttribute', 'attr');
			}
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('pyjamas.DOM.getStyleAttribute', i);
				}
			}
			var __r = [elem, attr];
			for (var pyjs__va_arg = 3;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		};
		track.lineno=496;
		pyjamas.DOM.insertChild = function(parent, toAdd, index) {
			if (pyjs_options.arg_count && arguments.length != 3) pyjs__exception_func_param(arguments.callee.__name__, 3, 3, arguments.length);
			track={module:'pyjamas.DOM',lineno:496};trackstack.push(track);
			track.module='pyjamas.DOM';
			track.lineno=496;
			track.lineno=511;

    var count = 0, child = parent.firstChild, before = null;
    while (child) {
      if (child.nodeType == 1) {
        if (count == index) {
          before = child;
          break;
        }
        ++count;
      }
      child = child.nextSibling;
    }

    parent.insertBefore(toAdd, before);
    
			trackstack.pop();track=trackstack.pop();trackstack.push(track);
		};
		pyjamas.DOM.insertChild.__name__ = 'insertChild';

		pyjamas.DOM.insertChild.parse_kwargs = function ( __kwargs, parent, toAdd, index ) {
			if (typeof parent == 'undefined') {
				parent=__kwargs.parent;
				delete __kwargs.parent;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.parent != 'undefined') {
				pyjs__exception_func_multiple_values('pyjamas.DOM.insertChild', 'parent');
			}
			if (typeof toAdd == 'undefined') {
				toAdd=__kwargs.toAdd;
				delete __kwargs.toAdd;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.toAdd != 'undefined') {
				pyjs__exception_func_multiple_values('pyjamas.DOM.insertChild', 'toAdd');
			}
			if (typeof index == 'undefined') {
				index=__kwargs.index;
				delete __kwargs.index;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.index != 'undefined') {
				pyjs__exception_func_multiple_values('pyjamas.DOM.insertChild', 'index');
			}
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('pyjamas.DOM.insertChild', i);
				}
			}
			var __r = [parent, toAdd, index];
			for (var pyjs__va_arg = 4;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		};
		track.lineno=513;
		pyjamas.DOM.iterChildren = function(elem) {
			if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length);

    var parent = elem;
    var child = elem.firstChild;
    var lastChild = null;
    return {
        'next': function() {
            if (child == null) {
                throw pyjslib.StopIteration;
            }
            lastChild = child;
            child = DOM.getNextSibling(child);
            return lastChild;
        },
        'remove': function() {        
            parent.removeChild(lastChild);
        },
        __iter__: function() {
            return this;
        }
    };
    
		};
		pyjamas.DOM.iterChildren.__name__ = 'iterChildren';

		pyjamas.DOM.iterChildren.parse_kwargs = function ( __kwargs, elem ) {
			if (typeof elem == 'undefined') {
				elem=__kwargs.elem;
				delete __kwargs.elem;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.elem != 'undefined') {
				pyjs__exception_func_multiple_values('pyjamas.DOM.iterChildren', 'elem');
			}
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('pyjamas.DOM.iterChildren', i);
				}
			}
			var __r = [elem];
			for (var pyjs__va_arg = 2;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		};
		track.lineno=540;
		pyjamas.DOM.walkChildren = function(elem) {
			if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length);

    var parent = elem;
    var child = DOM.getFirstChild(elem);
    var lastChild = null;
    var stack = [];
    var parentStack = [];
    return {
        'next': function() {
            if (child == null) {
                throw pyjslib.StopIteration;
            }
            lastChild = child;
            var firstChild = DOM.getFirstChild(child);
            var nextSibling = DOM.getNextSibling(child);
            if(firstChild != null) {
               if(nextSibling != null) {
                   stack.push(nextSibling);
                   parentStack.push(parent);
                }
                parent = child;
                child = firstChild;
            } else if(nextSibling != null) {
                child = nextSibling;
            } else if(stack.length > 0) {
                child = stack.pop();
                parent = parentStack.pop();
            } else {
                child = null;
            }
            return lastChild;
        },
        'remove': function() {        
            parent.removeChild(lastChild);
        },
        __iter__: function() {
            return this;
        }
    };
    
		};
		pyjamas.DOM.walkChildren.__name__ = 'walkChildren';

		pyjamas.DOM.walkChildren.parse_kwargs = function ( __kwargs, elem ) {
			if (typeof elem == 'undefined') {
				elem=__kwargs.elem;
				delete __kwargs.elem;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.elem != 'undefined') {
				pyjs__exception_func_multiple_values('pyjamas.DOM.walkChildren', 'elem');
			}
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('pyjamas.DOM.walkChildren', i);
				}
			}
			var __r = [elem];
			for (var pyjs__va_arg = 2;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		};
		track.lineno=586;
		pyjamas.DOM.isOrHasChild = function(parent, child) {
			if (pyjs_options.arg_count && arguments.length != 2) pyjs__exception_func_param(arguments.callee.__name__, 2, 2, arguments.length);

    while (child) {
        if ((!parent.isSameNode)) {
			if (parent == child) {
				return true;
			}
		}
		else if (parent.isSameNode(child)) {
            return true;
        }
        try {
            child = child.parentNode;
        } catch(e) {
          // Give up on 'Permission denied to get property
          // HTMLDivElement.parentNode'
          // See https://bugzilla.mozilla.org/show_bug.cgi?id=208427
          return false;
        }
        if (child && (child.nodeType != 1)) {
          child = null;
        }
      }
    return false;
    
		};
		pyjamas.DOM.isOrHasChild.__name__ = 'isOrHasChild';

		pyjamas.DOM.isOrHasChild.parse_kwargs = function ( __kwargs, parent, child ) {
			if (typeof parent == 'undefined') {
				parent=__kwargs.parent;
				delete __kwargs.parent;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.parent != 'undefined') {
				pyjs__exception_func_multiple_values('pyjamas.DOM.isOrHasChild', 'parent');
			}
			if (typeof child == 'undefined') {
				child=__kwargs.child;
				delete __kwargs.child;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.child != 'undefined') {
				pyjs__exception_func_multiple_values('pyjamas.DOM.isOrHasChild', 'child');
			}
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('pyjamas.DOM.isOrHasChild', i);
				}
			}
			var __r = [parent, child];
			for (var pyjs__va_arg = 3;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		};
		track.lineno=598;
		pyjamas.DOM.releaseCapture = function(elem) {
			if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length);
			track={module:'pyjamas.DOM',lineno:598};trackstack.push(track);
			track.module='pyjamas.DOM';
			track.lineno=598;
			track.lineno=172;

    if ((DOM.sCaptureElem != null) && DOM.compare(elem, DOM.sCaptureElem))
        DOM.sCaptureElem = null;
    
	if (!elem.isSameNode) {
		if (elem == $wnd.__captureElem) {
			$wnd.__captureElem = null;
		}
	}
	else if (elem.isSameNode($wnd.__captureElem)) {
        $wnd.__captureElem = null;
    }
    
			trackstack.pop();track=trackstack.pop();trackstack.push(track);
		};
		pyjamas.DOM.releaseCapture.__name__ = 'releaseCapture';

		pyjamas.DOM.releaseCapture.parse_kwargs = function ( __kwargs, elem ) {
			if (typeof elem == 'undefined') {
				elem=__kwargs.elem;
				delete __kwargs.elem;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.elem != 'undefined') {
				pyjs__exception_func_multiple_values('pyjamas.DOM.releaseCapture', 'elem');
			}
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('pyjamas.DOM.releaseCapture', i);
				}
			}
			var __r = [elem];
			for (var pyjs__va_arg = 2;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		};
		track.lineno=604;
		pyjamas.DOM.removeChild = function(parent, child) {
			if (pyjs_options.arg_count && arguments.length != 2) pyjs__exception_func_param(arguments.callee.__name__, 2, 2, arguments.length);
			track={module:'pyjamas.DOM',lineno:604};trackstack.push(track);
			track.module='pyjamas.DOM';
			track.lineno=604;
			track.lineno=607;

    parent.removeChild(child);
    
			trackstack.pop();track=trackstack.pop();trackstack.push(track);
		};
		pyjamas.DOM.removeChild.__name__ = 'removeChild';

		pyjamas.DOM.removeChild.parse_kwargs = function ( __kwargs, parent, child ) {
			if (typeof parent == 'undefined') {
				parent=__kwargs.parent;
				delete __kwargs.parent;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.parent != 'undefined') {
				pyjs__exception_func_multiple_values('pyjamas.DOM.removeChild', 'parent');
			}
			if (typeof child == 'undefined') {
				child=__kwargs.child;
				delete __kwargs.child;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.child != 'undefined') {
				pyjs__exception_func_multiple_values('pyjamas.DOM.removeChild', 'child');
			}
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('pyjamas.DOM.removeChild', i);
				}
			}
			var __r = [parent, child];
			for (var pyjs__va_arg = 3;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		};
		track.lineno=609;
		pyjamas.DOM.replaceChild = function(parent, newChild, oldChild) {
			if (pyjs_options.arg_count && arguments.length != 3) pyjs__exception_func_param(arguments.callee.__name__, 3, 3, arguments.length);
			track={module:'pyjamas.DOM',lineno:609};trackstack.push(track);
			track.module='pyjamas.DOM';
			track.lineno=609;
			track.lineno=612;

    parent.replaceChild(newChild, oldChild);
    
			trackstack.pop();track=trackstack.pop();trackstack.push(track);
		};
		pyjamas.DOM.replaceChild.__name__ = 'replaceChild';

		pyjamas.DOM.replaceChild.parse_kwargs = function ( __kwargs, parent, newChild, oldChild ) {
			if (typeof parent == 'undefined') {
				parent=__kwargs.parent;
				delete __kwargs.parent;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.parent != 'undefined') {
				pyjs__exception_func_multiple_values('pyjamas.DOM.replaceChild', 'parent');
			}
			if (typeof newChild == 'undefined') {
				newChild=__kwargs.newChild;
				delete __kwargs.newChild;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.newChild != 'undefined') {
				pyjs__exception_func_multiple_values('pyjamas.DOM.replaceChild', 'newChild');
			}
			if (typeof oldChild == 'undefined') {
				oldChild=__kwargs.oldChild;
				delete __kwargs.oldChild;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.oldChild != 'undefined') {
				pyjs__exception_func_multiple_values('pyjamas.DOM.replaceChild', 'oldChild');
			}
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('pyjamas.DOM.replaceChild', i);
				}
			}
			var __r = [parent, newChild, oldChild];
			for (var pyjs__va_arg = 4;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		};
		track.lineno=614;
		pyjamas.DOM.removeEventPreview = function(preview) {
			if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length);
			track={module:'pyjamas.DOM',lineno:614};trackstack.push(track);
			track.module='pyjamas.DOM';
			track.lineno=614;
			track.lineno=615;
			track.lineno=616;
			pyjamas.DOM.sEventPreviewStack.remove(preview);
			trackstack.pop();track=trackstack.pop();trackstack.push(track);
			return null;
		};
		pyjamas.DOM.removeEventPreview.__name__ = 'removeEventPreview';

		pyjamas.DOM.removeEventPreview.parse_kwargs = function ( __kwargs, preview ) {
			if (typeof preview == 'undefined') {
				preview=__kwargs.preview;
				delete __kwargs.preview;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.preview != 'undefined') {
				pyjs__exception_func_multiple_values('pyjamas.DOM.removeEventPreview', 'preview');
			}
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('pyjamas.DOM.removeEventPreview', i);
				}
			}
			var __r = [preview];
			for (var pyjs__va_arg = 2;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		};
		track.lineno=618;
		pyjamas.DOM.scrollIntoView = function(elem) {
			if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length);
			track={module:'pyjamas.DOM',lineno:618};trackstack.push(track);
			track.module='pyjamas.DOM';
			track.lineno=618;
			track.lineno=655;

    var left = elem.offsetLeft, top = elem.offsetTop;
    var width = elem.offsetWidth, height = elem.offsetHeight;
    
    if (elem.parentNode != elem.offsetParent) {
        left -= elem.parentNode.offsetLeft;
        top -= elem.parentNode.offsetTop;
    }

    var cur = elem.parentNode;
    while (cur && (cur.nodeType == 1)) {
        if ((cur.style.overflow == 'auto') || (cur.style.overflow == 'scroll')) {
            if (left < cur.scrollLeft) {
                cur.scrollLeft = left;
            }
            if (left + width > cur.scrollLeft + cur.clientWidth) {
                cur.scrollLeft = (left + width) - cur.clientWidth;
            }
            if (top < cur.scrollTop) {
                cur.scrollTop = top;
            }
            if (top + height > cur.scrollTop + cur.clientHeight) {
                cur.scrollTop = (top + height) - cur.clientHeight;
            }
        }

        var offsetLeft = cur.offsetLeft, offsetTop = cur.offsetTop;
        if (cur.parentNode != cur.offsetParent) {
            offsetLeft -= cur.parentNode.offsetLeft;
            offsetTop -= cur.parentNode.offsetTop;
        }

        left += offsetLeft - cur.scrollLeft;
        top += offsetTop - cur.scrollTop;
        cur = cur.parentNode;
    }
    
			trackstack.pop();track=trackstack.pop();trackstack.push(track);
		};
		pyjamas.DOM.scrollIntoView.__name__ = 'scrollIntoView';

		pyjamas.DOM.scrollIntoView.parse_kwargs = function ( __kwargs, elem ) {
			if (typeof elem == 'undefined') {
				elem=__kwargs.elem;
				delete __kwargs.elem;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.elem != 'undefined') {
				pyjs__exception_func_multiple_values('pyjamas.DOM.scrollIntoView', 'elem');
			}
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('pyjamas.DOM.scrollIntoView', i);
				}
			}
			var __r = [elem];
			for (var pyjs__va_arg = 2;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		};
		track.lineno=657;
		pyjamas.DOM.removeAttribute = function(element, attribute) {
			if (pyjs_options.arg_count && arguments.length != 2) pyjs__exception_func_param(arguments.callee.__name__, 2, 2, arguments.length);
			track={module:'pyjamas.DOM',lineno:657};trackstack.push(track);
			track.module='pyjamas.DOM';
			track.lineno=657;
			track.lineno=660;

    delete element[attribute];
    
			trackstack.pop();track=trackstack.pop();trackstack.push(track);
		};
		pyjamas.DOM.removeAttribute.__name__ = 'removeAttribute';

		pyjamas.DOM.removeAttribute.parse_kwargs = function ( __kwargs, element, attribute ) {
			if (typeof element == 'undefined') {
				element=__kwargs.element;
				delete __kwargs.element;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.element != 'undefined') {
				pyjs__exception_func_multiple_values('pyjamas.DOM.removeAttribute', 'element');
			}
			if (typeof attribute == 'undefined') {
				attribute=__kwargs.attribute;
				delete __kwargs.attribute;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.attribute != 'undefined') {
				pyjs__exception_func_multiple_values('pyjamas.DOM.removeAttribute', 'attribute');
			}
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('pyjamas.DOM.removeAttribute', i);
				}
			}
			var __r = [element, attribute];
			for (var pyjs__va_arg = 3;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		};
		track.lineno=662;
		pyjamas.DOM.setAttribute = function(element, attribute, value) {
			if (pyjs_options.arg_count && arguments.length != 3) pyjs__exception_func_param(arguments.callee.__name__, 3, 3, arguments.length);
			track={module:'pyjamas.DOM',lineno:662};trackstack.push(track);
			track.module='pyjamas.DOM';
			track.lineno=662;
			track.lineno=665;

    element[attribute] = value;
    
			trackstack.pop();track=trackstack.pop();trackstack.push(track);
		};
		pyjamas.DOM.setAttribute.__name__ = 'setAttribute';

		pyjamas.DOM.setAttribute.parse_kwargs = function ( __kwargs, element, attribute, value ) {
			if (typeof element == 'undefined') {
				element=__kwargs.element;
				delete __kwargs.element;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.element != 'undefined') {
				pyjs__exception_func_multiple_values('pyjamas.DOM.setAttribute', 'element');
			}
			if (typeof attribute == 'undefined') {
				attribute=__kwargs.attribute;
				delete __kwargs.attribute;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.attribute != 'undefined') {
				pyjs__exception_func_multiple_values('pyjamas.DOM.setAttribute', 'attribute');
			}
			if (typeof value == 'undefined') {
				value=__kwargs.value;
				delete __kwargs.value;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.value != 'undefined') {
				pyjs__exception_func_multiple_values('pyjamas.DOM.setAttribute', 'value');
			}
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('pyjamas.DOM.setAttribute', i);
				}
			}
			var __r = [element, attribute, value];
			for (var pyjs__va_arg = 4;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		};
		track.lineno=667;
		pyjamas.DOM.setBooleanAttribute = function(elem, attr, value) {
			if (pyjs_options.arg_count && arguments.length != 3) pyjs__exception_func_param(arguments.callee.__name__, 3, 3, arguments.length);
			track={module:'pyjamas.DOM',lineno:667};trackstack.push(track);
			track.module='pyjamas.DOM';
			track.lineno=667;
			track.lineno=670;

    elem[attr] = value;
    
			trackstack.pop();track=trackstack.pop();trackstack.push(track);
		};
		pyjamas.DOM.setBooleanAttribute.__name__ = 'setBooleanAttribute';

		pyjamas.DOM.setBooleanAttribute.parse_kwargs = function ( __kwargs, elem, attr, value ) {
			if (typeof elem == 'undefined') {
				elem=__kwargs.elem;
				delete __kwargs.elem;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.elem != 'undefined') {
				pyjs__exception_func_multiple_values('pyjamas.DOM.setBooleanAttribute', 'elem');
			}
			if (typeof attr == 'undefined') {
				attr=__kwargs.attr;
				delete __kwargs.attr;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.attr != 'undefined') {
				pyjs__exception_func_multiple_values('pyjamas.DOM.setBooleanAttribute', 'attr');
			}
			if (typeof value == 'undefined') {
				value=__kwargs.value;
				delete __kwargs.value;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.value != 'undefined') {
				pyjs__exception_func_multiple_values('pyjamas.DOM.setBooleanAttribute', 'value');
			}
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('pyjamas.DOM.setBooleanAttribute', i);
				}
			}
			var __r = [elem, attr, value];
			for (var pyjs__va_arg = 4;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		};
		track.lineno=672;
		pyjamas.DOM.setCapture = function(elem) {
			if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length);
			track={module:'pyjamas.DOM',lineno:672};trackstack.push(track);
			track.module='pyjamas.DOM';
			track.lineno=672;
			track.lineno=675;

    DOM.sCaptureElem = elem;
    
			trackstack.pop();track=trackstack.pop();trackstack.push(track);
		};
		pyjamas.DOM.setCapture.__name__ = 'setCapture';

		pyjamas.DOM.setCapture.parse_kwargs = function ( __kwargs, elem ) {
			if (typeof elem == 'undefined') {
				elem=__kwargs.elem;
				delete __kwargs.elem;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.elem != 'undefined') {
				pyjs__exception_func_multiple_values('pyjamas.DOM.setCapture', 'elem');
			}
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('pyjamas.DOM.setCapture', i);
				}
			}
			var __r = [elem];
			for (var pyjs__va_arg = 2;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		};
		track.lineno=677;
		pyjamas.DOM.setEventListener = function(element, listener) {
			if (pyjs_options.arg_count && arguments.length != 2) pyjs__exception_func_param(arguments.callee.__name__, 2, 2, arguments.length);
			track={module:'pyjamas.DOM',lineno:677};trackstack.push(track);
			track.module='pyjamas.DOM';
			track.lineno=677;
			track.lineno=686;

    element.__listener = listener;
    
			trackstack.pop();track=trackstack.pop();trackstack.push(track);
		};
		pyjamas.DOM.setEventListener.__name__ = 'setEventListener';

		pyjamas.DOM.setEventListener.parse_kwargs = function ( __kwargs, element, listener ) {
			if (typeof element == 'undefined') {
				element=__kwargs.element;
				delete __kwargs.element;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.element != 'undefined') {
				pyjs__exception_func_multiple_values('pyjamas.DOM.setEventListener', 'element');
			}
			if (typeof listener == 'undefined') {
				listener=__kwargs.listener;
				delete __kwargs.listener;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.listener != 'undefined') {
				pyjs__exception_func_multiple_values('pyjamas.DOM.setEventListener', 'listener');
			}
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('pyjamas.DOM.setEventListener', i);
				}
			}
			var __r = [element, listener];
			for (var pyjs__va_arg = 3;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		};
		track.lineno=688;
		pyjamas.DOM.setInnerHTML = function(element, html) {
			if (pyjs_options.arg_count && arguments.length != 2) pyjs__exception_func_param(arguments.callee.__name__, 2, 2, arguments.length);
			track={module:'pyjamas.DOM',lineno:688};trackstack.push(track);
			track.module='pyjamas.DOM';
			track.lineno=688;
			track.lineno=694;

    if (!html) {
        html = "";
    }
    element.innerHTML = html;
    
			trackstack.pop();track=trackstack.pop();trackstack.push(track);
		};
		pyjamas.DOM.setInnerHTML.__name__ = 'setInnerHTML';

		pyjamas.DOM.setInnerHTML.parse_kwargs = function ( __kwargs, element, html ) {
			if (typeof element == 'undefined') {
				element=__kwargs.element;
				delete __kwargs.element;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.element != 'undefined') {
				pyjs__exception_func_multiple_values('pyjamas.DOM.setInnerHTML', 'element');
			}
			if (typeof html == 'undefined') {
				html=__kwargs.html;
				delete __kwargs.html;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.html != 'undefined') {
				pyjs__exception_func_multiple_values('pyjamas.DOM.setInnerHTML', 'html');
			}
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('pyjamas.DOM.setInnerHTML', i);
				}
			}
			var __r = [element, html];
			for (var pyjs__va_arg = 3;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		};
		track.lineno=696;
		pyjamas.DOM.setInnerText = function(elem, text) {
			if (pyjs_options.arg_count && arguments.length != 2) pyjs__exception_func_param(arguments.callee.__name__, 2, 2, arguments.length);
			track={module:'pyjamas.DOM',lineno:696};trackstack.push(track);
			track.module='pyjamas.DOM';
			track.lineno=696;
			track.lineno=704;

    // Remove all children first.
    while (elem.firstChild) {
        elem.removeChild(elem.firstChild);
    }
    // Add a new text node.
    elem.appendChild($doc.createTextNode(text));
    
			trackstack.pop();track=trackstack.pop();trackstack.push(track);
		};
		pyjamas.DOM.setInnerText.__name__ = 'setInnerText';

		pyjamas.DOM.setInnerText.parse_kwargs = function ( __kwargs, elem, text ) {
			if (typeof elem == 'undefined') {
				elem=__kwargs.elem;
				delete __kwargs.elem;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.elem != 'undefined') {
				pyjs__exception_func_multiple_values('pyjamas.DOM.setInnerText', 'elem');
			}
			if (typeof text == 'undefined') {
				text=__kwargs.text;
				delete __kwargs.text;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.text != 'undefined') {
				pyjs__exception_func_multiple_values('pyjamas.DOM.setInnerText', 'text');
			}
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('pyjamas.DOM.setInnerText', i);
				}
			}
			var __r = [elem, text];
			for (var pyjs__va_arg = 3;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		};
		track.lineno=706;
		pyjamas.DOM.setIntAttribute = function(elem, attr, value) {
			if (pyjs_options.arg_count && arguments.length != 3) pyjs__exception_func_param(arguments.callee.__name__, 3, 3, arguments.length);
			track={module:'pyjamas.DOM',lineno:706};trackstack.push(track);
			track.module='pyjamas.DOM';
			track.lineno=706;
			track.lineno=709;

    elem[attr] = value;
    
			trackstack.pop();track=trackstack.pop();trackstack.push(track);
		};
		pyjamas.DOM.setIntAttribute.__name__ = 'setIntAttribute';

		pyjamas.DOM.setIntAttribute.parse_kwargs = function ( __kwargs, elem, attr, value ) {
			if (typeof elem == 'undefined') {
				elem=__kwargs.elem;
				delete __kwargs.elem;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.elem != 'undefined') {
				pyjs__exception_func_multiple_values('pyjamas.DOM.setIntAttribute', 'elem');
			}
			if (typeof attr == 'undefined') {
				attr=__kwargs.attr;
				delete __kwargs.attr;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.attr != 'undefined') {
				pyjs__exception_func_multiple_values('pyjamas.DOM.setIntAttribute', 'attr');
			}
			if (typeof value == 'undefined') {
				value=__kwargs.value;
				delete __kwargs.value;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.value != 'undefined') {
				pyjs__exception_func_multiple_values('pyjamas.DOM.setIntAttribute', 'value');
			}
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('pyjamas.DOM.setIntAttribute', i);
				}
			}
			var __r = [elem, attr, value];
			for (var pyjs__va_arg = 4;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		};
		track.lineno=711;
		pyjamas.DOM.setIntStyleAttribute = function(elem, attr, value) {
			if (pyjs_options.arg_count && arguments.length != 3) pyjs__exception_func_param(arguments.callee.__name__, 3, 3, arguments.length);
			track={module:'pyjamas.DOM',lineno:711};trackstack.push(track);
			track.module='pyjamas.DOM';
			track.lineno=711;
			track.lineno=714;

    elem.style[attr] = value;
    
			trackstack.pop();track=trackstack.pop();trackstack.push(track);
		};
		pyjamas.DOM.setIntStyleAttribute.__name__ = 'setIntStyleAttribute';

		pyjamas.DOM.setIntStyleAttribute.parse_kwargs = function ( __kwargs, elem, attr, value ) {
			if (typeof elem == 'undefined') {
				elem=__kwargs.elem;
				delete __kwargs.elem;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.elem != 'undefined') {
				pyjs__exception_func_multiple_values('pyjamas.DOM.setIntStyleAttribute', 'elem');
			}
			if (typeof attr == 'undefined') {
				attr=__kwargs.attr;
				delete __kwargs.attr;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.attr != 'undefined') {
				pyjs__exception_func_multiple_values('pyjamas.DOM.setIntStyleAttribute', 'attr');
			}
			if (typeof value == 'undefined') {
				value=__kwargs.value;
				delete __kwargs.value;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.value != 'undefined') {
				pyjs__exception_func_multiple_values('pyjamas.DOM.setIntStyleAttribute', 'value');
			}
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('pyjamas.DOM.setIntStyleAttribute', i);
				}
			}
			var __r = [elem, attr, value];
			for (var pyjs__va_arg = 4;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		};
		track.lineno=716;
		pyjamas.DOM.setOptionText = function(select, text, index) {
			if (pyjs_options.arg_count && arguments.length != 3) pyjs__exception_func_param(arguments.callee.__name__, 3, 3, arguments.length);
			track={module:'pyjamas.DOM',lineno:716};trackstack.push(track);
			track.module='pyjamas.DOM';
			track.lineno=716;
			track.lineno=720;

    var option = select.options[index];
    option.text = text;
    
			trackstack.pop();track=trackstack.pop();trackstack.push(track);
		};
		pyjamas.DOM.setOptionText.__name__ = 'setOptionText';

		pyjamas.DOM.setOptionText.parse_kwargs = function ( __kwargs, select, text, index ) {
			if (typeof select == 'undefined') {
				select=__kwargs.select;
				delete __kwargs.select;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.select != 'undefined') {
				pyjs__exception_func_multiple_values('pyjamas.DOM.setOptionText', 'select');
			}
			if (typeof text == 'undefined') {
				text=__kwargs.text;
				delete __kwargs.text;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.text != 'undefined') {
				pyjs__exception_func_multiple_values('pyjamas.DOM.setOptionText', 'text');
			}
			if (typeof index == 'undefined') {
				index=__kwargs.index;
				delete __kwargs.index;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.index != 'undefined') {
				pyjs__exception_func_multiple_values('pyjamas.DOM.setOptionText', 'index');
			}
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('pyjamas.DOM.setOptionText', i);
				}
			}
			var __r = [select, text, index];
			for (var pyjs__va_arg = 4;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		};
		track.lineno=722;
		pyjamas.DOM.setStyleAttribute = function(element, name, value) {
			if (pyjs_options.arg_count && arguments.length != 3) pyjs__exception_func_param(arguments.callee.__name__, 3, 3, arguments.length);
			track={module:'pyjamas.DOM',lineno:722};trackstack.push(track);
			track.module='pyjamas.DOM';
			track.lineno=722;
			track.lineno=725;

    element.style[name] = value;
    
			trackstack.pop();track=trackstack.pop();trackstack.push(track);
		};
		pyjamas.DOM.setStyleAttribute.__name__ = 'setStyleAttribute';

		pyjamas.DOM.setStyleAttribute.parse_kwargs = function ( __kwargs, element, name, value ) {
			if (typeof element == 'undefined') {
				element=__kwargs.element;
				delete __kwargs.element;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.element != 'undefined') {
				pyjs__exception_func_multiple_values('pyjamas.DOM.setStyleAttribute', 'element');
			}
			if (typeof name == 'undefined') {
				name=__kwargs.name;
				delete __kwargs.name;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.name != 'undefined') {
				pyjs__exception_func_multiple_values('pyjamas.DOM.setStyleAttribute', 'name');
			}
			if (typeof value == 'undefined') {
				value=__kwargs.value;
				delete __kwargs.value;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.value != 'undefined') {
				pyjs__exception_func_multiple_values('pyjamas.DOM.setStyleAttribute', 'value');
			}
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('pyjamas.DOM.setStyleAttribute', i);
				}
			}
			var __r = [element, name, value];
			for (var pyjs__va_arg = 4;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		};
		track.lineno=727;
		pyjamas.DOM.sinkEvents = function(element, bits) {
			if (pyjs_options.arg_count && arguments.length != 2) pyjs__exception_func_param(arguments.callee.__name__, 2, 2, arguments.length);
			track={module:'pyjamas.DOM',lineno:727};trackstack.push(track);
			track.module='pyjamas.DOM';
			track.lineno=727;
			track.lineno=755;

    element.__eventBits = bits;
    
    element.onclick    = (bits & 0x00001) ? $wnd.__dispatchEvent : null;
    element.ondblclick  = (bits & 0x00002) ? $wnd.__dispatchEvent : null;
    element.onmousedown   = (bits & 0x00004) ? $wnd.__dispatchEvent : null;
    element.onmouseup    = (bits & 0x00008) ? $wnd.__dispatchEvent : null;
    element.onmouseover   = (bits & 0x00010) ? $wnd.__dispatchEvent : null;
    element.onmouseout  = (bits & 0x00020) ? $wnd.__dispatchEvent : null;
    element.onmousemove   = (bits & 0x00040) ? $wnd.__dispatchEvent : null;
    element.onkeydown    = (bits & 0x00080) ? $wnd.__dispatchEvent : null;
    element.onkeypress  = (bits & 0x00100) ? $wnd.__dispatchEvent : null;
    element.onkeyup    = (bits & 0x00200) ? $wnd.__dispatchEvent : null;
    element.onchange      = (bits & 0x00400) ? $wnd.__dispatchEvent : null;
    element.onfocus    = (bits & 0x00800) ? $wnd.__dispatchEvent : null;
    element.onblur      = (bits & 0x01000) ? $wnd.__dispatchEvent : null;
    element.onlosecapture = (bits & 0x02000) ? $wnd.__dispatchEvent : null;
    element.onscroll      = (bits & 0x04000) ? $wnd.__dispatchEvent : null;
    element.onload      = (bits & 0x08000) ? $wnd.__dispatchEvent : null;
    element.onerror    = (bits & 0x10000) ? $wnd.__dispatchEvent : null;
    element.oncontextmenu = (bits & 0x20000) ? $wnd.__dispatchEvent : null;
    
			trackstack.pop();track=trackstack.pop();trackstack.push(track);
		};
		pyjamas.DOM.sinkEvents.__name__ = 'sinkEvents';

		pyjamas.DOM.sinkEvents.parse_kwargs = function ( __kwargs, element, bits ) {
			if (typeof element == 'undefined') {
				element=__kwargs.element;
				delete __kwargs.element;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.element != 'undefined') {
				pyjs__exception_func_multiple_values('pyjamas.DOM.sinkEvents', 'element');
			}
			if (typeof bits == 'undefined') {
				bits=__kwargs.bits;
				delete __kwargs.bits;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.bits != 'undefined') {
				pyjs__exception_func_multiple_values('pyjamas.DOM.sinkEvents', 'bits');
			}
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('pyjamas.DOM.sinkEvents', i);
				}
			}
			var __r = [element, bits];
			for (var pyjs__va_arg = 3;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		};
		track.lineno=757;
		pyjamas.DOM.toString = function(elem) {
			if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length);

    var temp = elem.cloneNode(true);
    var tempDiv = $doc.createElement("DIV");
    tempDiv.appendChild(temp);
    outer = tempDiv.innerHTML;
    temp.innerHTML = "";
    return outer;
    
		};
		pyjamas.DOM.toString.__name__ = 'toString';

		pyjamas.DOM.toString.parse_kwargs = function ( __kwargs, elem ) {
			if (typeof elem == 'undefined') {
				elem=__kwargs.elem;
				delete __kwargs.elem;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.elem != 'undefined') {
				pyjs__exception_func_multiple_values('pyjamas.DOM.toString', 'elem');
			}
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('pyjamas.DOM.toString', i);
				}
			}
			var __r = [elem];
			for (var pyjs__va_arg = 2;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		};
		track.lineno=768;
		pyjamas.DOM.dispatchEvent = function(event, element, listener) {
			if (pyjs_options.arg_count && arguments.length != 3) pyjs__exception_func_param(arguments.callee.__name__, 3, 3, arguments.length);
			track={module:'pyjamas.DOM',lineno:768};trackstack.push(track);
			track.module='pyjamas.DOM';
			track.lineno=768;
			track.lineno=769;
			pyjamas.DOM.dispatchEventImpl(event, element, listener);
			trackstack.pop();track=trackstack.pop();trackstack.push(track);
			return null;
		};
		pyjamas.DOM.dispatchEvent.__name__ = 'dispatchEvent';

		pyjamas.DOM.dispatchEvent.parse_kwargs = function ( __kwargs, event, element, listener ) {
			if (typeof event == 'undefined') {
				event=__kwargs.event;
				delete __kwargs.event;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.event != 'undefined') {
				pyjs__exception_func_multiple_values('pyjamas.DOM.dispatchEvent', 'event');
			}
			if (typeof element == 'undefined') {
				element=__kwargs.element;
				delete __kwargs.element;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.element != 'undefined') {
				pyjs__exception_func_multiple_values('pyjamas.DOM.dispatchEvent', 'element');
			}
			if (typeof listener == 'undefined') {
				listener=__kwargs.listener;
				delete __kwargs.listener;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.listener != 'undefined') {
				pyjs__exception_func_multiple_values('pyjamas.DOM.dispatchEvent', 'listener');
			}
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('pyjamas.DOM.dispatchEvent', i);
				}
			}
			var __r = [event, element, listener];
			for (var pyjs__va_arg = 4;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		};
		track.lineno=771;
		pyjamas.DOM.previewEvent = function(evt) {
			if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length);
			track={module:'pyjamas.DOM',lineno:771};trackstack.push(track);
			track.module='pyjamas.DOM';
			track.lineno=771;
			track.lineno=772;
			track.lineno=773;
			var ret = true;
			track.lineno=774;
			if (pyjslib.bool((pyjslib.cmp(pyjslib.len(pyjamas.DOM.sEventPreviewStack), 0) == 1))) {
				track.lineno=775;
				var preview = pyjamas.DOM.sEventPreviewStack.__getitem__( ( pyjslib.len(pyjamas.DOM.sEventPreviewStack) - 1 ) );
				track.lineno=777;
				ret = preview.onEventPreview(evt);
				track.lineno=778;
				if (pyjslib.bool(!(ret))) {
					track.lineno=779;
					pyjamas.DOM.eventCancelBubble(evt, true);
					track.lineno=780;
					pyjamas.DOM.eventPreventDefault(evt);
				}
			}
			track.lineno=782;
			track.lineno=782;
			var pyjs__ret = ret;
			trackstack.pop();track=trackstack.pop();trackstack.push(track);
			return pyjs__ret;
		};
		pyjamas.DOM.previewEvent.__name__ = 'previewEvent';

		pyjamas.DOM.previewEvent.parse_kwargs = function ( __kwargs, evt ) {
			if (typeof evt == 'undefined') {
				evt=__kwargs.evt;
				delete __kwargs.evt;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.evt != 'undefined') {
				pyjs__exception_func_multiple_values('pyjamas.DOM.previewEvent', 'evt');
			}
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('pyjamas.DOM.previewEvent', i);
				}
			}
			var __r = [evt];
			for (var pyjs__va_arg = 2;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		};
		track.lineno=785;
		pyjamas.DOM.dispatchEventAndCatch = function(evt, elem, listener, handler) {
			if (pyjs_options.arg_count && arguments.length != 4) pyjs__exception_func_param(arguments.callee.__name__, 4, 4, arguments.length);
			track={module:'pyjamas.DOM',lineno:785};trackstack.push(track);
			track.module='pyjamas.DOM';
			track.lineno=785;
			track.lineno=786;
			trackstack.pop();track=trackstack.pop();trackstack.push(track);
			return null;
		};
		pyjamas.DOM.dispatchEventAndCatch.__name__ = 'dispatchEventAndCatch';

		pyjamas.DOM.dispatchEventAndCatch.parse_kwargs = function ( __kwargs, evt, elem, listener, handler ) {
			if (typeof evt == 'undefined') {
				evt=__kwargs.evt;
				delete __kwargs.evt;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.evt != 'undefined') {
				pyjs__exception_func_multiple_values('pyjamas.DOM.dispatchEventAndCatch', 'evt');
			}
			if (typeof elem == 'undefined') {
				elem=__kwargs.elem;
				delete __kwargs.elem;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.elem != 'undefined') {
				pyjs__exception_func_multiple_values('pyjamas.DOM.dispatchEventAndCatch', 'elem');
			}
			if (typeof listener == 'undefined') {
				listener=__kwargs.listener;
				delete __kwargs.listener;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.listener != 'undefined') {
				pyjs__exception_func_multiple_values('pyjamas.DOM.dispatchEventAndCatch', 'listener');
			}
			if (typeof handler == 'undefined') {
				handler=__kwargs.handler;
				delete __kwargs.handler;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.handler != 'undefined') {
				pyjs__exception_func_multiple_values('pyjamas.DOM.dispatchEventAndCatch', 'handler');
			}
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('pyjamas.DOM.dispatchEventAndCatch', i);
				}
			}
			var __r = [evt, elem, listener, handler];
			for (var pyjs__va_arg = 5;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		};
		track.lineno=788;
		pyjamas.DOM.dispatchEventImpl = function(event, element, listener) {
			if (pyjs_options.arg_count && arguments.length != 3) pyjs__exception_func_param(arguments.callee.__name__, 3, 3, arguments.length);
			track={module:'pyjamas.DOM',lineno:788};trackstack.push(track);
			track.module='pyjamas.DOM';
			track.lineno=788;
			track.lineno=789;
			track.lineno=790;
			if (pyjslib.bool(pyjslib.eq(element, pyjamas.DOM.sCaptureElem))) {
				track.lineno=791;
				if (pyjslib.bool(pyjslib.eq(pyjamas.DOM.eventGetType(event), String('losecapture')))) {
					track.lineno=792;
					pyjamas.DOM.sCaptureElem = null;
				}
			}
			track.lineno=793;
			var prevCurrentEvent = pyjamas.DOM.currentEvent;
			track.lineno=794;
			pyjamas.DOM.currentEvent = event;
			track.lineno=795;
			listener.onBrowserEvent(event);
			track.lineno=796;
			pyjamas.DOM.currentEvent = prevCurrentEvent;
			trackstack.pop();track=trackstack.pop();trackstack.push(track);
			return null;
		};
		pyjamas.DOM.dispatchEventImpl.__name__ = 'dispatchEventImpl';

		pyjamas.DOM.dispatchEventImpl.parse_kwargs = function ( __kwargs, event, element, listener ) {
			if (typeof event == 'undefined') {
				event=__kwargs.event;
				delete __kwargs.event;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.event != 'undefined') {
				pyjs__exception_func_multiple_values('pyjamas.DOM.dispatchEventImpl', 'event');
			}
			if (typeof element == 'undefined') {
				element=__kwargs.element;
				delete __kwargs.element;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.element != 'undefined') {
				pyjs__exception_func_multiple_values('pyjamas.DOM.dispatchEventImpl', 'element');
			}
			if (typeof listener == 'undefined') {
				listener=__kwargs.listener;
				delete __kwargs.listener;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.listener != 'undefined') {
				pyjs__exception_func_multiple_values('pyjamas.DOM.dispatchEventImpl', 'listener');
			}
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('pyjamas.DOM.dispatchEventImpl', i);
				}
			}
			var __r = [event, element, listener];
			for (var pyjs__va_arg = 4;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		};
		track.lineno=798;
		pyjamas.DOM.eventGetCurrentEvent = function() {
			if (pyjs_options.arg_count && arguments.length != 0) pyjs__exception_func_param(arguments.callee.__name__, 0, 0, arguments.length);
			track={module:'pyjamas.DOM',lineno:798};trackstack.push(track);
			track.module='pyjamas.DOM';
			track.lineno=798;
			track.lineno=799;
			track.lineno=800;
			track.lineno=800;
			var pyjs__ret = pyjamas.DOM.currentEvent;
			trackstack.pop();track=trackstack.pop();trackstack.push(track);
			return pyjs__ret;
		};
		pyjamas.DOM.eventGetCurrentEvent.__name__ = 'eventGetCurrentEvent';

		pyjamas.DOM.eventGetCurrentEvent.parse_kwargs = function ( __kwargs ) {
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('pyjamas.DOM.eventGetCurrentEvent', i);
				}
			}
			var __r = [];
			for (var pyjs__va_arg = 1;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		};
		track.lineno=802;
		pyjamas.DOM.insertListItem = function(select, item, value, index) {
			if (pyjs_options.arg_count && arguments.length != 4) pyjs__exception_func_param(arguments.callee.__name__, 4, 4, arguments.length);
			track={module:'pyjamas.DOM',lineno:802};trackstack.push(track);
			track.module='pyjamas.DOM';
			track.lineno=802;
			track.lineno=803;
			var option = pyjamas.DOM.createElement(String('OPTION'));
			track.lineno=804;
			pyjamas.DOM.setInnerText(option, item);
			track.lineno=805;
			if (pyjslib.bool((value != null))) {
				track.lineno=806;
				pyjamas.DOM.setAttribute(option, String('value'), value);
			}
			track.lineno=807;
			if (pyjslib.bool(pyjslib.eq(index, -1))) {
				track.lineno=808;
				pyjamas.DOM.appendChild(select, option);
			}
			else {
				track.lineno=810;
				pyjamas.DOM.insertChild(select, option, index);
			}
			trackstack.pop();track=trackstack.pop();trackstack.push(track);
			return null;
		};
		pyjamas.DOM.insertListItem.__name__ = 'insertListItem';

		pyjamas.DOM.insertListItem.parse_kwargs = function ( __kwargs, select, item, value, index ) {
			if (typeof select == 'undefined') {
				select=__kwargs.select;
				delete __kwargs.select;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.select != 'undefined') {
				pyjs__exception_func_multiple_values('pyjamas.DOM.insertListItem', 'select');
			}
			if (typeof item == 'undefined') {
				item=__kwargs.item;
				delete __kwargs.item;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.item != 'undefined') {
				pyjs__exception_func_multiple_values('pyjamas.DOM.insertListItem', 'item');
			}
			if (typeof value == 'undefined') {
				value=__kwargs.value;
				delete __kwargs.value;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.value != 'undefined') {
				pyjs__exception_func_multiple_values('pyjamas.DOM.insertListItem', 'value');
			}
			if (typeof index == 'undefined') {
				index=__kwargs.index;
				delete __kwargs.index;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.index != 'undefined') {
				pyjs__exception_func_multiple_values('pyjamas.DOM.insertListItem', 'index');
			}
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('pyjamas.DOM.insertListItem', i);
				}
			}
			var __r = [select, item, value, index];
			for (var pyjs__va_arg = 5;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		};
		track.lineno=814;
		pyjamas.DOM.init();

	} catch (pyjs_attr_err) {throw pyjslib._errorMapping(pyjs_attr_err)};
return this;
}; /* end pyjamas.DOM */ 




pyjamas.DOM_loaded_fn = function() {
}

pyjamas.DOM_prepare_mod = function() {
    if ((typeof (module_load_request['pyjamas.DOM']) == 'undefined') ||
        (module_load_request['pyjamas.DOM'] < 2)) {
        module_load_request['pyjamas.DOM'] = 2;
    }
    var modnames = new pyjslib.List([
		new pyjslib.List([
			'pyjamas']),
		new pyjslib.List([
			])
	]);
    sys.overrides.update(new pyjslib.Dict({
		'mozilla.pyjslib': 'mozilla.pyjslib',
		'mozilla.pyjamas.DOM': 'mozilla.pyjamas.DOM'
	}));
    path = sys.loadpath;
    /*
    pyjslib.preload_app_modules(path, modnames, pyjamas.DOM_loaded_fn,
                                            0,
                                            null);
                                            //'pyjamas.DOM');
                                            */
    //alert("module ajax loaded fn called pyjamas.DOM");

    if (sys.appname != 'pyjamas.DOM')
    {
        if (module_load_request['pyjamas.DOM'] < 3) {
            module_load_request['pyjamas.DOM'] = 3;
        }
    }
}

//alert("module ajax loaded pyjamas.DOM");

pyjamas.DOM_prepare_mod();


// pyjamas.Location

// module libs (usually imported javascript)



// module code

pyjamas.Location = function (__mod_name__) {
	if(pyjamas.Location.__was_initialized__) return;
	pyjamas.Location.__was_initialized__ = true;
	if (__mod_name__ == null) __mod_name__ = 'pyjamas.Location';
	var __name__ = pyjamas.Location.__name__ = __mod_name__;
	pyjamas.Location.__track_lines__ = new Array();
	var Location = pyjamas.Location;

		pyjamas.Location.__track_lines__[1] = "pyjamas.Location.py, line 1:\n    def makeUrlDict(s):";
		pyjamas.Location.__track_lines__[2] = "pyjamas.Location.py, line 2:\n    dict = {}";
		pyjamas.Location.__track_lines__[3] = "pyjamas.Location.py, line 3:\n    pairs = s.split(\"&\")";
		pyjamas.Location.__track_lines__[4] = "pyjamas.Location.py, line 4:\n    for pair in pairs:";
		pyjamas.Location.__track_lines__[5] = "pyjamas.Location.py, line 5:\n    if len(pair) < 3: continue";
		pyjamas.Location.__track_lines__[6] = "pyjamas.Location.py, line 6:\n    kv = pair.split(\"=\",1)";
		pyjamas.Location.__track_lines__[7] = "pyjamas.Location.py, line 7:\n    dict[kv[0]] = kv[1]";
		pyjamas.Location.__track_lines__[8] = "pyjamas.Location.py, line 8:\n    return dict";
		pyjamas.Location.__track_lines__[10] = "pyjamas.Location.py, line 10:\n    def makeUrlStringFromDict(d):";
		pyjamas.Location.__track_lines__[11] = "pyjamas.Location.py, line 11:\n    pairs = []";
		pyjamas.Location.__track_lines__[12] = "pyjamas.Location.py, line 12:\n    for k,v in d.iteritems():";
		pyjamas.Location.__track_lines__[13] = "pyjamas.Location.py, line 13:\n    pairs.append(k+\"=\"+v)";
		pyjamas.Location.__track_lines__[14] = "pyjamas.Location.py, line 14:\n    return \"&\".join(pairs)";
		pyjamas.Location.__track_lines__[16] = "pyjamas.Location.py, line 16:\n    class Location:";
		pyjamas.Location.__track_lines__[24] = "pyjamas.Location.py, line 24:\n    def __init__(self, location):";
		pyjamas.Location.__track_lines__[25] = "pyjamas.Location.py, line 25:\n    self.location = location";
		pyjamas.Location.__track_lines__[27] = "pyjamas.Location.py, line 27:\n    def getHash(self):";
		pyjamas.Location.__track_lines__[28] = "pyjamas.Location.py, line 28:\n    return self.location.hash";
		pyjamas.Location.__track_lines__[30] = "pyjamas.Location.py, line 30:\n    def getHashDict(self):";
		pyjamas.Location.__track_lines__[31] = "pyjamas.Location.py, line 31:\n    if not self.hashDict or self.hashDictHash != self.getHash():";
		pyjamas.Location.__track_lines__[32] = "pyjamas.Location.py, line 32:\n    self.hashDictHash = self.getHash()";
		pyjamas.Location.__track_lines__[33] = "pyjamas.Location.py, line 33:\n    self.hashDict = makeUrlDict(self.getHash().slice(1))";
		pyjamas.Location.__track_lines__[34] = "pyjamas.Location.py, line 34:\n    return self.hashDict";
		pyjamas.Location.__track_lines__[36] = "pyjamas.Location.py, line 36:\n    def getHost(self):";
		pyjamas.Location.__track_lines__[37] = "pyjamas.Location.py, line 37:\n    return self.location.host";
		pyjamas.Location.__track_lines__[39] = "pyjamas.Location.py, line 39:\n    def getHostname(self):";
		pyjamas.Location.__track_lines__[40] = "pyjamas.Location.py, line 40:\n    return self.location.hostname";
		pyjamas.Location.__track_lines__[42] = "pyjamas.Location.py, line 42:\n    def getHref(self):";
		pyjamas.Location.__track_lines__[43] = "pyjamas.Location.py, line 43:\n    return self.location.href";
		pyjamas.Location.__track_lines__[45] = "pyjamas.Location.py, line 45:\n    def getPageHref(self):";
		pyjamas.Location.__track_lines__[49] = "pyjamas.Location.py, line 49:\n    href = self.location.href";
		pyjamas.Location.__track_lines__[50] = "pyjamas.Location.py, line 50:\n    if href.find(\"?\"): href = href.split(\"?\")[0]";
		pyjamas.Location.__track_lines__[51] = "pyjamas.Location.py, line 51:\n    if href.find(\"#\"): href = href.split(\"#\")[0]";
		pyjamas.Location.__track_lines__[52] = "pyjamas.Location.py, line 52:\n    return href";
		pyjamas.Location.__track_lines__[54] = "pyjamas.Location.py, line 54:\n    def getPathname(self):";
		pyjamas.Location.__track_lines__[55] = "pyjamas.Location.py, line 55:\n    return self.location.pathname";
		pyjamas.Location.__track_lines__[57] = "pyjamas.Location.py, line 57:\n    def getPort(self):";
		pyjamas.Location.__track_lines__[58] = "pyjamas.Location.py, line 58:\n    return self.location.port";
		pyjamas.Location.__track_lines__[60] = "pyjamas.Location.py, line 60:\n    def getProtocol(self):";
		pyjamas.Location.__track_lines__[61] = "pyjamas.Location.py, line 61:\n    return self.location.protocol";
		pyjamas.Location.__track_lines__[63] = "pyjamas.Location.py, line 63:\n    def getSearch(self):";
		pyjamas.Location.__track_lines__[64] = "pyjamas.Location.py, line 64:\n    return \"\"+self.location.search";
		pyjamas.Location.__track_lines__[66] = "pyjamas.Location.py, line 66:\n    def getSearchDict(self):";
		pyjamas.Location.__track_lines__[67] = "pyjamas.Location.py, line 67:\n    if not hasattr(self, \'searchDict\'):";
		pyjamas.Location.__track_lines__[68] = "pyjamas.Location.py, line 68:\n    self.searchDict = makeUrlDict(self.getSearch().slice(1))";
		pyjamas.Location.__track_lines__[69] = "pyjamas.Location.py, line 69:\n    return self.searchDict";
		pyjamas.Location.__track_lines__[71] = "pyjamas.Location.py, line 71:\n    def getSearchVar(self, key):";
		pyjamas.Location.__track_lines__[72] = "pyjamas.Location.py, line 72:\n    searchDict = self.getSearchDict()";
		pyjamas.Location.__track_lines__[73] = "pyjamas.Location.py, line 73:\n    return searchDict.get(key)";
		pyjamas.Location.__track_lines__[75] = "pyjamas.Location.py, line 75:\n    def reload(self):";
		pyjamas.Location.__track_lines__[76] = "pyjamas.Location.py, line 76:\n    self.location.reload()";
		pyjamas.Location.__track_lines__[78] = "pyjamas.Location.py, line 78:\n    def setHref(self, href):";
		pyjamas.Location.__track_lines__[79] = "pyjamas.Location.py, line 79:\n    self.location.href = href";
		pyjamas.Location.__track_lines__[81] = "pyjamas.Location.py, line 81:\n    def setSearch(self, search):";
		pyjamas.Location.__track_lines__[82] = "pyjamas.Location.py, line 82:\n    self.location.search = search";
		pyjamas.Location.__track_lines__[84] = "pyjamas.Location.py, line 84:\n    def setSearchDict(self, searchDict):";
		pyjamas.Location.__track_lines__[85] = "pyjamas.Location.py, line 85:\n    self.setSearch(makeUrlStringFromDict(searchDict))";
		pyjamas.Location.__track_lines__[87] = "pyjamas.Location.py, line 87:\n    def setHash(self, hash):";
		pyjamas.Location.__track_lines__[88] = "pyjamas.Location.py, line 88:\n    self.location.hash = hash";
		pyjamas.Location.__track_lines__[90] = "pyjamas.Location.py, line 90:\n    def setHashDict(self, hashDict):";
		pyjamas.Location.__track_lines__[91] = "pyjamas.Location.py, line 91:\n    self.setHash(makeUrlStringFromDict(hashDict))";
	try {
		track.module='pyjamas.Location';
		track.lineno=1;
		track.lineno=1;
		pyjamas.Location.makeUrlDict = function(s) {
			if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length);
			track={module:'pyjamas.Location',lineno:1};trackstack.push(track);
			track.module='pyjamas.Location';
			track.lineno=1;
			track.lineno=2;
			var dict = new pyjslib.Dict([]);
			track.lineno=3;
			var pairs = s.split(String('\x26'));
			track.lineno=4;
			var pyjs__trackstack_size_1=trackstack.length;
			var __pair = pairs.__iter__();
			try {
				while (true) {
					var pair = __pair.next();
					
					track.lineno=5;
					if (pyjslib.bool((pyjslib.cmp(pyjslib.len(pair), 3) == -1))) {
						track.lineno=5;
						continue;
					}
					track.lineno=6;
					var kv = pair.split(String('='), 1);
					track.lineno=7;
					dict.__setitem__(kv.__getitem__(0), kv.__getitem__(1));
				}
			} catch (e) {
				if (e.__name__ != 'StopIteration') {
					throw e;
				}
			}
			if (trackstack.length > pyjs__trackstack_size_1) {
				trackstack = trackstack.slice(0,pyjs__trackstack_size_1);
				track = trackstack.slice(-1)[0];
			}
			track.module='pyjamas.Location';
			track.lineno=8;
			track.lineno=8;
			var pyjs__ret = dict;
			trackstack.pop();track=trackstack.pop();trackstack.push(track);
			return pyjs__ret;
		};
		pyjamas.Location.makeUrlDict.__name__ = 'makeUrlDict';

		pyjamas.Location.makeUrlDict.parse_kwargs = function ( __kwargs, s ) {
			if (typeof s == 'undefined') {
				s=__kwargs.s;
				delete __kwargs.s;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.s != 'undefined') {
				pyjs__exception_func_multiple_values('pyjamas.Location.makeUrlDict', 's');
			}
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('pyjamas.Location.makeUrlDict', i);
				}
			}
			var __r = [s];
			for (var pyjs__va_arg = 2;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		};
		track.lineno=10;
		pyjamas.Location.makeUrlStringFromDict = function(d) {
			if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length);
			track={module:'pyjamas.Location',lineno:10};trackstack.push(track);
			track.module='pyjamas.Location';
			track.lineno=10;
			track.lineno=11;
			var pairs = new pyjslib.List([]);
			track.lineno=12;
			var pyjs__trackstack_size_1=trackstack.length;
			var __temp_k = d.iteritems().__iter__();
			try {
				while (true) {
					var temp_k = __temp_k.next();
								var k = temp_k.__getitem__(0);
                			var v = temp_k.__getitem__(1);
                
					track.lineno=13;
					pairs.append( (  ( k + String('=') )  + v ) );
				}
			} catch (e) {
				if (e.__name__ != 'StopIteration') {
					throw e;
				}
			}
			if (trackstack.length > pyjs__trackstack_size_1) {
				trackstack = trackstack.slice(0,pyjs__trackstack_size_1);
				track = trackstack.slice(-1)[0];
			}
			track.module='pyjamas.Location';
			track.lineno=14;
			track.lineno=14;
			var pyjs__ret = String('\x26').join(pairs);
			trackstack.pop();track=trackstack.pop();trackstack.push(track);
			return pyjs__ret;
		};
		pyjamas.Location.makeUrlStringFromDict.__name__ = 'makeUrlStringFromDict';

		pyjamas.Location.makeUrlStringFromDict.parse_kwargs = function ( __kwargs, d ) {
			if (typeof d == 'undefined') {
				d=__kwargs.d;
				delete __kwargs.d;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.d != 'undefined') {
				pyjs__exception_func_multiple_values('pyjamas.Location.makeUrlStringFromDict', 'd');
			}
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('pyjamas.Location.makeUrlStringFromDict', i);
				}
			}
			var __r = [d];
			for (var pyjs__va_arg = 2;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		};
		track.lineno=16;
		pyjamas.Location.Location = (function(){
			var cls_instance = pyjs__class_instance('Location');
			var cls_definition = new Object();
			cls_definition.__md5__ = '92ab2f6e750a45bf34c98514cb89647a';
			cls_definition.__init__ = pyjs__bind_method(cls_instance, '__init__', function(location) {
				if (this.__is_instance__ === true) {
					var self = this;
					if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 2, 2, arguments.length+1);
				} else {
					var self = arguments[0];
					location = arguments[1];
					if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					if (pyjs_options.arg_count && arguments.length != 2) pyjs__exception_func_param(arguments.callee.__name__, 2, 2, arguments.length);
				}
				if (pyjs_options.arg_instance_type) {
					if (self.prototype.__md5__ !== '92ab2f6e750a45bf34c98514cb89647a') {
						if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
							pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
						}
					}
				}
				track={module:pyjamas.Location, lineno:24};trackstack.push(track);
				track.module='pyjamas.Location';
				track.lineno=24;
				track.lineno=25;
				self.location = location;
				trackstack.pop();track=trackstack.pop();trackstack.push(track);
				return null;
			}
			, function ( __kwargs, location ) {
				if (typeof location == 'undefined') {
					location=__kwargs.location;
					delete __kwargs.location;
				} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.location != 'undefined') {
					pyjs__exception_func_multiple_values('__init__', 'location');
				}
				if (pyjs_options.arg_kwarg_unexpected_keyword) {
					for (var i in __kwargs) {
						pyjs__exception_func_unexpected_keyword('__init__', i);
					}
				}
				var __r = [location];
				for (var pyjs__va_arg = 2;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
					__r.push(arguments[pyjs__va_arg]);
				}

				return __r;
			});
			cls_definition.getHash = pyjs__bind_method(cls_instance, 'getHash', function() {
				if (this.__is_instance__ === true) {
					var self = this;
					if (pyjs_options.arg_count && arguments.length != 0) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length+1);
				} else {
					var self = arguments[0];
					if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length);
				}
				if (pyjs_options.arg_instance_type) {
					if (self.prototype.__md5__ !== '92ab2f6e750a45bf34c98514cb89647a') {
						if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
							pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
						}
					}
				}
				track={module:pyjamas.Location, lineno:27};trackstack.push(track);
				track.module='pyjamas.Location';
				track.lineno=27;
				track.lineno=28;
				track.lineno=28;
				var pyjs__ret = (self.location.hash===undefined?(function(){throw new TypeError('self.location.hash is undefined')})():(typeof self.location.hash == 'function' && self.location.__is_instance__?pyjslib.getattr(self.location, 'hash'):self.location.hash));
				trackstack.pop();track=trackstack.pop();trackstack.push(track);
				return pyjs__ret;
			}
			, function ( __kwargs ) {
				if (pyjs_options.arg_kwarg_unexpected_keyword) {
					for (var i in __kwargs) {
						pyjs__exception_func_unexpected_keyword('getHash', i);
					}
				}
				var __r = [];
				for (var pyjs__va_arg = 1;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
					__r.push(arguments[pyjs__va_arg]);
				}

				return __r;
			});
			cls_definition.getHashDict = pyjs__bind_method(cls_instance, 'getHashDict', function() {
				if (this.__is_instance__ === true) {
					var self = this;
					if (pyjs_options.arg_count && arguments.length != 0) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length+1);
				} else {
					var self = arguments[0];
					if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length);
				}
				if (pyjs_options.arg_instance_type) {
					if (self.prototype.__md5__ !== '92ab2f6e750a45bf34c98514cb89647a') {
						if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
							pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
						}
					}
				}
				track={module:pyjamas.Location, lineno:30};trackstack.push(track);
				track.module='pyjamas.Location';
				track.lineno=30;
				track.lineno=31;
				if (pyjslib.bool((!((self.hashDict===undefined?(function(){throw new TypeError('self.hashDict is undefined')})():(typeof self.hashDict == 'function' && self.__is_instance__?pyjslib.getattr(self, 'hashDict'):self.hashDict)))) || (((self.hashDictHash===undefined?(function(){throw new TypeError('self.hashDictHash is undefined')})():(typeof self.hashDictHash == 'function' && self.__is_instance__?pyjslib.getattr(self, 'hashDictHash'):self.hashDictHash)) != self.getHash())))) {
					track.lineno=32;
					self.hashDictHash = self.getHash();
					track.lineno=33;
					self.hashDict = pyjamas.Location.makeUrlDict(self.getHash().slice(1));
				}
				track.lineno=34;
				track.lineno=34;
				var pyjs__ret = (self.hashDict===undefined?(function(){throw new TypeError('self.hashDict is undefined')})():(typeof self.hashDict == 'function' && self.__is_instance__?pyjslib.getattr(self, 'hashDict'):self.hashDict));
				trackstack.pop();track=trackstack.pop();trackstack.push(track);
				return pyjs__ret;
			}
			, function ( __kwargs ) {
				if (pyjs_options.arg_kwarg_unexpected_keyword) {
					for (var i in __kwargs) {
						pyjs__exception_func_unexpected_keyword('getHashDict', i);
					}
				}
				var __r = [];
				for (var pyjs__va_arg = 1;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
					__r.push(arguments[pyjs__va_arg]);
				}

				return __r;
			});
			cls_definition.getHost = pyjs__bind_method(cls_instance, 'getHost', function() {
				if (this.__is_instance__ === true) {
					var self = this;
					if (pyjs_options.arg_count && arguments.length != 0) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length+1);
				} else {
					var self = arguments[0];
					if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length);
				}
				if (pyjs_options.arg_instance_type) {
					if (self.prototype.__md5__ !== '92ab2f6e750a45bf34c98514cb89647a') {
						if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
							pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
						}
					}
				}
				track={module:pyjamas.Location, lineno:36};trackstack.push(track);
				track.module='pyjamas.Location';
				track.lineno=36;
				track.lineno=37;
				track.lineno=37;
				var pyjs__ret = (self.location.host===undefined?(function(){throw new TypeError('self.location.host is undefined')})():(typeof self.location.host == 'function' && self.location.__is_instance__?pyjslib.getattr(self.location, 'host'):self.location.host));
				trackstack.pop();track=trackstack.pop();trackstack.push(track);
				return pyjs__ret;
			}
			, function ( __kwargs ) {
				if (pyjs_options.arg_kwarg_unexpected_keyword) {
					for (var i in __kwargs) {
						pyjs__exception_func_unexpected_keyword('getHost', i);
					}
				}
				var __r = [];
				for (var pyjs__va_arg = 1;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
					__r.push(arguments[pyjs__va_arg]);
				}

				return __r;
			});
			cls_definition.getHostname = pyjs__bind_method(cls_instance, 'getHostname', function() {
				if (this.__is_instance__ === true) {
					var self = this;
					if (pyjs_options.arg_count && arguments.length != 0) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length+1);
				} else {
					var self = arguments[0];
					if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length);
				}
				if (pyjs_options.arg_instance_type) {
					if (self.prototype.__md5__ !== '92ab2f6e750a45bf34c98514cb89647a') {
						if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
							pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
						}
					}
				}
				track={module:pyjamas.Location, lineno:39};trackstack.push(track);
				track.module='pyjamas.Location';
				track.lineno=39;
				track.lineno=40;
				track.lineno=40;
				var pyjs__ret = (self.location.hostname===undefined?(function(){throw new TypeError('self.location.hostname is undefined')})():(typeof self.location.hostname == 'function' && self.location.__is_instance__?pyjslib.getattr(self.location, 'hostname'):self.location.hostname));
				trackstack.pop();track=trackstack.pop();trackstack.push(track);
				return pyjs__ret;
			}
			, function ( __kwargs ) {
				if (pyjs_options.arg_kwarg_unexpected_keyword) {
					for (var i in __kwargs) {
						pyjs__exception_func_unexpected_keyword('getHostname', i);
					}
				}
				var __r = [];
				for (var pyjs__va_arg = 1;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
					__r.push(arguments[pyjs__va_arg]);
				}

				return __r;
			});
			cls_definition.getHref = pyjs__bind_method(cls_instance, 'getHref', function() {
				if (this.__is_instance__ === true) {
					var self = this;
					if (pyjs_options.arg_count && arguments.length != 0) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length+1);
				} else {
					var self = arguments[0];
					if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length);
				}
				if (pyjs_options.arg_instance_type) {
					if (self.prototype.__md5__ !== '92ab2f6e750a45bf34c98514cb89647a') {
						if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
							pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
						}
					}
				}
				track={module:pyjamas.Location, lineno:42};trackstack.push(track);
				track.module='pyjamas.Location';
				track.lineno=42;
				track.lineno=43;
				track.lineno=43;
				var pyjs__ret = (self.location.href===undefined?(function(){throw new TypeError('self.location.href is undefined')})():(typeof self.location.href == 'function' && self.location.__is_instance__?pyjslib.getattr(self.location, 'href'):self.location.href));
				trackstack.pop();track=trackstack.pop();trackstack.push(track);
				return pyjs__ret;
			}
			, function ( __kwargs ) {
				if (pyjs_options.arg_kwarg_unexpected_keyword) {
					for (var i in __kwargs) {
						pyjs__exception_func_unexpected_keyword('getHref', i);
					}
				}
				var __r = [];
				for (var pyjs__va_arg = 1;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
					__r.push(arguments[pyjs__va_arg]);
				}

				return __r;
			});
			cls_definition.getPageHref = pyjs__bind_method(cls_instance, 'getPageHref', function() {
				if (this.__is_instance__ === true) {
					var self = this;
					if (pyjs_options.arg_count && arguments.length != 0) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length+1);
				} else {
					var self = arguments[0];
					if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length);
				}
				if (pyjs_options.arg_instance_type) {
					if (self.prototype.__md5__ !== '92ab2f6e750a45bf34c98514cb89647a') {
						if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
							pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
						}
					}
				}
				track={module:pyjamas.Location, lineno:45};trackstack.push(track);
				track.module='pyjamas.Location';
				track.lineno=45;
				track.lineno=49;
				var href = (self.location.href===undefined?(function(){throw new TypeError('self.location.href is undefined')})():(typeof self.location.href == 'function' && self.location.__is_instance__?pyjslib.getattr(self.location, 'href'):self.location.href));
				track.lineno=50;
				if (pyjslib.bool(href.find(String('?')))) {
					track.lineno=50;
					href = href.split(String('?')).__getitem__(0);
				}
				track.lineno=51;
				if (pyjslib.bool(href.find(String('#')))) {
					track.lineno=51;
					href = href.split(String('#')).__getitem__(0);
				}
				track.lineno=52;
				track.lineno=52;
				var pyjs__ret = href;
				trackstack.pop();track=trackstack.pop();trackstack.push(track);
				return pyjs__ret;
			}
			, function ( __kwargs ) {
				if (pyjs_options.arg_kwarg_unexpected_keyword) {
					for (var i in __kwargs) {
						pyjs__exception_func_unexpected_keyword('getPageHref', i);
					}
				}
				var __r = [];
				for (var pyjs__va_arg = 1;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
					__r.push(arguments[pyjs__va_arg]);
				}

				return __r;
			});
			cls_definition.getPathname = pyjs__bind_method(cls_instance, 'getPathname', function() {
				if (this.__is_instance__ === true) {
					var self = this;
					if (pyjs_options.arg_count && arguments.length != 0) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length+1);
				} else {
					var self = arguments[0];
					if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length);
				}
				if (pyjs_options.arg_instance_type) {
					if (self.prototype.__md5__ !== '92ab2f6e750a45bf34c98514cb89647a') {
						if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
							pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
						}
					}
				}
				track={module:pyjamas.Location, lineno:54};trackstack.push(track);
				track.module='pyjamas.Location';
				track.lineno=54;
				track.lineno=55;
				track.lineno=55;
				var pyjs__ret = (self.location.pathname===undefined?(function(){throw new TypeError('self.location.pathname is undefined')})():(typeof self.location.pathname == 'function' && self.location.__is_instance__?pyjslib.getattr(self.location, 'pathname'):self.location.pathname));
				trackstack.pop();track=trackstack.pop();trackstack.push(track);
				return pyjs__ret;
			}
			, function ( __kwargs ) {
				if (pyjs_options.arg_kwarg_unexpected_keyword) {
					for (var i in __kwargs) {
						pyjs__exception_func_unexpected_keyword('getPathname', i);
					}
				}
				var __r = [];
				for (var pyjs__va_arg = 1;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
					__r.push(arguments[pyjs__va_arg]);
				}

				return __r;
			});
			cls_definition.getPort = pyjs__bind_method(cls_instance, 'getPort', function() {
				if (this.__is_instance__ === true) {
					var self = this;
					if (pyjs_options.arg_count && arguments.length != 0) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length+1);
				} else {
					var self = arguments[0];
					if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length);
				}
				if (pyjs_options.arg_instance_type) {
					if (self.prototype.__md5__ !== '92ab2f6e750a45bf34c98514cb89647a') {
						if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
							pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
						}
					}
				}
				track={module:pyjamas.Location, lineno:57};trackstack.push(track);
				track.module='pyjamas.Location';
				track.lineno=57;
				track.lineno=58;
				track.lineno=58;
				var pyjs__ret = (self.location.port===undefined?(function(){throw new TypeError('self.location.port is undefined')})():(typeof self.location.port == 'function' && self.location.__is_instance__?pyjslib.getattr(self.location, 'port'):self.location.port));
				trackstack.pop();track=trackstack.pop();trackstack.push(track);
				return pyjs__ret;
			}
			, function ( __kwargs ) {
				if (pyjs_options.arg_kwarg_unexpected_keyword) {
					for (var i in __kwargs) {
						pyjs__exception_func_unexpected_keyword('getPort', i);
					}
				}
				var __r = [];
				for (var pyjs__va_arg = 1;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
					__r.push(arguments[pyjs__va_arg]);
				}

				return __r;
			});
			cls_definition.getProtocol = pyjs__bind_method(cls_instance, 'getProtocol', function() {
				if (this.__is_instance__ === true) {
					var self = this;
					if (pyjs_options.arg_count && arguments.length != 0) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length+1);
				} else {
					var self = arguments[0];
					if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length);
				}
				if (pyjs_options.arg_instance_type) {
					if (self.prototype.__md5__ !== '92ab2f6e750a45bf34c98514cb89647a') {
						if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
							pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
						}
					}
				}
				track={module:pyjamas.Location, lineno:60};trackstack.push(track);
				track.module='pyjamas.Location';
				track.lineno=60;
				track.lineno=61;
				track.lineno=61;
				var pyjs__ret = (self.location.protocol===undefined?(function(){throw new TypeError('self.location.protocol is undefined')})():(typeof self.location.protocol == 'function' && self.location.__is_instance__?pyjslib.getattr(self.location, 'protocol'):self.location.protocol));
				trackstack.pop();track=trackstack.pop();trackstack.push(track);
				return pyjs__ret;
			}
			, function ( __kwargs ) {
				if (pyjs_options.arg_kwarg_unexpected_keyword) {
					for (var i in __kwargs) {
						pyjs__exception_func_unexpected_keyword('getProtocol', i);
					}
				}
				var __r = [];
				for (var pyjs__va_arg = 1;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
					__r.push(arguments[pyjs__va_arg]);
				}

				return __r;
			});
			cls_definition.getSearch = pyjs__bind_method(cls_instance, 'getSearch', function() {
				if (this.__is_instance__ === true) {
					var self = this;
					if (pyjs_options.arg_count && arguments.length != 0) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length+1);
				} else {
					var self = arguments[0];
					if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length);
				}
				if (pyjs_options.arg_instance_type) {
					if (self.prototype.__md5__ !== '92ab2f6e750a45bf34c98514cb89647a') {
						if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
							pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
						}
					}
				}
				track={module:pyjamas.Location, lineno:63};trackstack.push(track);
				track.module='pyjamas.Location';
				track.lineno=63;
				track.lineno=64;
				track.lineno=64;
				var pyjs__ret =  ( String('') + (self.location.search===undefined?(function(){throw new TypeError('self.location.search is undefined')})():(typeof self.location.search == 'function' && self.location.__is_instance__?pyjslib.getattr(self.location, 'search'):self.location.search)) ) ;
				trackstack.pop();track=trackstack.pop();trackstack.push(track);
				return pyjs__ret;
			}
			, function ( __kwargs ) {
				if (pyjs_options.arg_kwarg_unexpected_keyword) {
					for (var i in __kwargs) {
						pyjs__exception_func_unexpected_keyword('getSearch', i);
					}
				}
				var __r = [];
				for (var pyjs__va_arg = 1;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
					__r.push(arguments[pyjs__va_arg]);
				}

				return __r;
			});
			cls_definition.getSearchDict = pyjs__bind_method(cls_instance, 'getSearchDict', function() {
				if (this.__is_instance__ === true) {
					var self = this;
					if (pyjs_options.arg_count && arguments.length != 0) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length+1);
				} else {
					var self = arguments[0];
					if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length);
				}
				if (pyjs_options.arg_instance_type) {
					if (self.prototype.__md5__ !== '92ab2f6e750a45bf34c98514cb89647a') {
						if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
							pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
						}
					}
				}
				track={module:pyjamas.Location, lineno:66};trackstack.push(track);
				track.module='pyjamas.Location';
				track.lineno=66;
				track.lineno=67;
				if (pyjslib.bool(!(pyjslib.hasattr(self, String('searchDict'))))) {
					track.lineno=68;
					self.searchDict = pyjamas.Location.makeUrlDict(self.getSearch().slice(1));
				}
				track.lineno=69;
				track.lineno=69;
				var pyjs__ret = (self.searchDict===undefined?(function(){throw new TypeError('self.searchDict is undefined')})():(typeof self.searchDict == 'function' && self.__is_instance__?pyjslib.getattr(self, 'searchDict'):self.searchDict));
				trackstack.pop();track=trackstack.pop();trackstack.push(track);
				return pyjs__ret;
			}
			, function ( __kwargs ) {
				if (pyjs_options.arg_kwarg_unexpected_keyword) {
					for (var i in __kwargs) {
						pyjs__exception_func_unexpected_keyword('getSearchDict', i);
					}
				}
				var __r = [];
				for (var pyjs__va_arg = 1;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
					__r.push(arguments[pyjs__va_arg]);
				}

				return __r;
			});
			cls_definition.getSearchVar = pyjs__bind_method(cls_instance, 'getSearchVar', function(key) {
				if (this.__is_instance__ === true) {
					var self = this;
					if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 2, 2, arguments.length+1);
				} else {
					var self = arguments[0];
					key = arguments[1];
					if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					if (pyjs_options.arg_count && arguments.length != 2) pyjs__exception_func_param(arguments.callee.__name__, 2, 2, arguments.length);
				}
				if (pyjs_options.arg_instance_type) {
					if (self.prototype.__md5__ !== '92ab2f6e750a45bf34c98514cb89647a') {
						if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
							pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
						}
					}
				}
				track={module:pyjamas.Location, lineno:71};trackstack.push(track);
				track.module='pyjamas.Location';
				track.lineno=71;
				track.lineno=72;
				var searchDict = self.getSearchDict();
				track.lineno=73;
				track.lineno=73;
				var pyjs__ret = searchDict.get(key);
				trackstack.pop();track=trackstack.pop();trackstack.push(track);
				return pyjs__ret;
			}
			, function ( __kwargs, key ) {
				if (typeof key == 'undefined') {
					key=__kwargs.key;
					delete __kwargs.key;
				} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.key != 'undefined') {
					pyjs__exception_func_multiple_values('getSearchVar', 'key');
				}
				if (pyjs_options.arg_kwarg_unexpected_keyword) {
					for (var i in __kwargs) {
						pyjs__exception_func_unexpected_keyword('getSearchVar', i);
					}
				}
				var __r = [key];
				for (var pyjs__va_arg = 2;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
					__r.push(arguments[pyjs__va_arg]);
				}

				return __r;
			});
			cls_definition.reload = pyjs__bind_method(cls_instance, 'reload', function() {
				if (this.__is_instance__ === true) {
					var self = this;
					if (pyjs_options.arg_count && arguments.length != 0) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length+1);
				} else {
					var self = arguments[0];
					if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length);
				}
				if (pyjs_options.arg_instance_type) {
					if (self.prototype.__md5__ !== '92ab2f6e750a45bf34c98514cb89647a') {
						if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
							pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
						}
					}
				}
				track={module:pyjamas.Location, lineno:75};trackstack.push(track);
				track.module='pyjamas.Location';
				track.lineno=75;
				track.lineno=76;
				self.location.reload();
				trackstack.pop();track=trackstack.pop();trackstack.push(track);
				return null;
			}
			, function ( __kwargs ) {
				if (pyjs_options.arg_kwarg_unexpected_keyword) {
					for (var i in __kwargs) {
						pyjs__exception_func_unexpected_keyword('reload', i);
					}
				}
				var __r = [];
				for (var pyjs__va_arg = 1;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
					__r.push(arguments[pyjs__va_arg]);
				}

				return __r;
			});
			cls_definition.setHref = pyjs__bind_method(cls_instance, 'setHref', function(href) {
				if (this.__is_instance__ === true) {
					var self = this;
					if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 2, 2, arguments.length+1);
				} else {
					var self = arguments[0];
					href = arguments[1];
					if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					if (pyjs_options.arg_count && arguments.length != 2) pyjs__exception_func_param(arguments.callee.__name__, 2, 2, arguments.length);
				}
				if (pyjs_options.arg_instance_type) {
					if (self.prototype.__md5__ !== '92ab2f6e750a45bf34c98514cb89647a') {
						if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
							pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
						}
					}
				}
				track={module:pyjamas.Location, lineno:78};trackstack.push(track);
				track.module='pyjamas.Location';
				track.lineno=78;
				track.lineno=79;
				self.location.href = href;
				trackstack.pop();track=trackstack.pop();trackstack.push(track);
				return null;
			}
			, function ( __kwargs, href ) {
				if (typeof href == 'undefined') {
					href=__kwargs.href;
					delete __kwargs.href;
				} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.href != 'undefined') {
					pyjs__exception_func_multiple_values('setHref', 'href');
				}
				if (pyjs_options.arg_kwarg_unexpected_keyword) {
					for (var i in __kwargs) {
						pyjs__exception_func_unexpected_keyword('setHref', i);
					}
				}
				var __r = [href];
				for (var pyjs__va_arg = 2;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
					__r.push(arguments[pyjs__va_arg]);
				}

				return __r;
			});
			cls_definition.setSearch = pyjs__bind_method(cls_instance, 'setSearch', function(search) {
				if (this.__is_instance__ === true) {
					var self = this;
					if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 2, 2, arguments.length+1);
				} else {
					var self = arguments[0];
					search = arguments[1];
					if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					if (pyjs_options.arg_count && arguments.length != 2) pyjs__exception_func_param(arguments.callee.__name__, 2, 2, arguments.length);
				}
				if (pyjs_options.arg_instance_type) {
					if (self.prototype.__md5__ !== '92ab2f6e750a45bf34c98514cb89647a') {
						if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
							pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
						}
					}
				}
				track={module:pyjamas.Location, lineno:81};trackstack.push(track);
				track.module='pyjamas.Location';
				track.lineno=81;
				track.lineno=82;
				self.location.search = search;
				trackstack.pop();track=trackstack.pop();trackstack.push(track);
				return null;
			}
			, function ( __kwargs, search ) {
				if (typeof search == 'undefined') {
					search=__kwargs.search;
					delete __kwargs.search;
				} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.search != 'undefined') {
					pyjs__exception_func_multiple_values('setSearch', 'search');
				}
				if (pyjs_options.arg_kwarg_unexpected_keyword) {
					for (var i in __kwargs) {
						pyjs__exception_func_unexpected_keyword('setSearch', i);
					}
				}
				var __r = [search];
				for (var pyjs__va_arg = 2;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
					__r.push(arguments[pyjs__va_arg]);
				}

				return __r;
			});
			cls_definition.setSearchDict = pyjs__bind_method(cls_instance, 'setSearchDict', function(searchDict) {
				if (this.__is_instance__ === true) {
					var self = this;
					if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 2, 2, arguments.length+1);
				} else {
					var self = arguments[0];
					searchDict = arguments[1];
					if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					if (pyjs_options.arg_count && arguments.length != 2) pyjs__exception_func_param(arguments.callee.__name__, 2, 2, arguments.length);
				}
				if (pyjs_options.arg_instance_type) {
					if (self.prototype.__md5__ !== '92ab2f6e750a45bf34c98514cb89647a') {
						if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
							pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
						}
					}
				}
				track={module:pyjamas.Location, lineno:84};trackstack.push(track);
				track.module='pyjamas.Location';
				track.lineno=84;
				track.lineno=85;
				self.setSearch(pyjamas.Location.makeUrlStringFromDict(searchDict));
				trackstack.pop();track=trackstack.pop();trackstack.push(track);
				return null;
			}
			, function ( __kwargs, searchDict ) {
				if (typeof searchDict == 'undefined') {
					searchDict=__kwargs.searchDict;
					delete __kwargs.searchDict;
				} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.searchDict != 'undefined') {
					pyjs__exception_func_multiple_values('setSearchDict', 'searchDict');
				}
				if (pyjs_options.arg_kwarg_unexpected_keyword) {
					for (var i in __kwargs) {
						pyjs__exception_func_unexpected_keyword('setSearchDict', i);
					}
				}
				var __r = [searchDict];
				for (var pyjs__va_arg = 2;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
					__r.push(arguments[pyjs__va_arg]);
				}

				return __r;
			});
			cls_definition.setHash = pyjs__bind_method(cls_instance, 'setHash', function(hash) {
				if (this.__is_instance__ === true) {
					var self = this;
					if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 2, 2, arguments.length+1);
				} else {
					var self = arguments[0];
					hash = arguments[1];
					if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					if (pyjs_options.arg_count && arguments.length != 2) pyjs__exception_func_param(arguments.callee.__name__, 2, 2, arguments.length);
				}
				if (pyjs_options.arg_instance_type) {
					if (self.prototype.__md5__ !== '92ab2f6e750a45bf34c98514cb89647a') {
						if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
							pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
						}
					}
				}
				track={module:pyjamas.Location, lineno:87};trackstack.push(track);
				track.module='pyjamas.Location';
				track.lineno=87;
				track.lineno=88;
				self.location.hash = hash;
				trackstack.pop();track=trackstack.pop();trackstack.push(track);
				return null;
			}
			, function ( __kwargs, hash ) {
				if (typeof hash == 'undefined') {
					hash=__kwargs.hash;
					delete __kwargs.hash;
				} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.hash != 'undefined') {
					pyjs__exception_func_multiple_values('setHash', 'hash');
				}
				if (pyjs_options.arg_kwarg_unexpected_keyword) {
					for (var i in __kwargs) {
						pyjs__exception_func_unexpected_keyword('setHash', i);
					}
				}
				var __r = [hash];
				for (var pyjs__va_arg = 2;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
					__r.push(arguments[pyjs__va_arg]);
				}

				return __r;
			});
			cls_definition.setHashDict = pyjs__bind_method(cls_instance, 'setHashDict', function(hashDict) {
				if (this.__is_instance__ === true) {
					var self = this;
					if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 2, 2, arguments.length+1);
				} else {
					var self = arguments[0];
					hashDict = arguments[1];
					if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					if (pyjs_options.arg_count && arguments.length != 2) pyjs__exception_func_param(arguments.callee.__name__, 2, 2, arguments.length);
				}
				if (pyjs_options.arg_instance_type) {
					if (self.prototype.__md5__ !== '92ab2f6e750a45bf34c98514cb89647a') {
						if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
							pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
						}
					}
				}
				track={module:pyjamas.Location, lineno:90};trackstack.push(track);
				track.module='pyjamas.Location';
				track.lineno=90;
				track.lineno=91;
				self.setHash(pyjamas.Location.makeUrlStringFromDict(hashDict));
				trackstack.pop();track=trackstack.pop();trackstack.push(track);
				return null;
			}
			, function ( __kwargs, hashDict ) {
				if (typeof hashDict == 'undefined') {
					hashDict=__kwargs.hashDict;
					delete __kwargs.hashDict;
				} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.hashDict != 'undefined') {
					pyjs__exception_func_multiple_values('setHashDict', 'hashDict');
				}
				if (pyjs_options.arg_kwarg_unexpected_keyword) {
					for (var i in __kwargs) {
						pyjs__exception_func_unexpected_keyword('setHashDict', i);
					}
				}
				var __r = [hashDict];
				for (var pyjs__va_arg = 2;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
					__r.push(arguments[pyjs__va_arg]);
				}

				return __r;
			});
			return pyjs__class_function(cls_instance, cls_definition, 
			                            new Array(pyjslib.object));
		})();

	} catch (pyjs_attr_err) {throw pyjslib._errorMapping(pyjs_attr_err)};
return this;
}; /* end pyjamas.Location */ 




pyjamas.Location_loaded_fn = function() {
}

pyjamas.Location_prepare_mod = function() {
    if ((typeof (module_load_request['pyjamas.Location']) == 'undefined') ||
        (module_load_request['pyjamas.Location'] < 2)) {
        module_load_request['pyjamas.Location'] = 2;
    }
    var modnames = new pyjslib.List([
		new pyjslib.List([
			'pyjamas']),
		new pyjslib.List([
			])
	]);
    sys.overrides.update(new pyjslib.Dict({
		'mozilla.pyjslib': 'mozilla.pyjslib',
		'mozilla.pyjamas.DOM': 'mozilla.pyjamas.DOM'
	}));
    path = sys.loadpath;
    /*
    pyjslib.preload_app_modules(path, modnames, pyjamas.Location_loaded_fn,
                                            0,
                                            null);
                                            //'pyjamas.Location');
                                            */
    //alert("module ajax loaded fn called pyjamas.Location");

    if (sys.appname != 'pyjamas.Location')
    {
        if (module_load_request['pyjamas.Location'] < 3) {
            module_load_request['pyjamas.Location'] = 3;
        }
    }
}

//alert("module ajax loaded pyjamas.Location");

pyjamas.Location_prepare_mod();


// pyjamas.Timer

// module libs (usually imported javascript)



// module code

pyjamas.Timer = function (__mod_name__) {
	if(pyjamas.Timer.__was_initialized__) return;
	pyjamas.Timer.__was_initialized__ = true;
	if (__mod_name__ == null) __mod_name__ = 'pyjamas.Timer';
	var __name__ = pyjamas.Timer.__name__ = __mod_name__;
	pyjamas.Timer.__track_lines__ = new Array();
	var Timer = pyjamas.Timer;

		pyjamas.Timer.__track_lines__[1] = "pyjamas.Timer.py, line 1:\n    #Timer().hookWindowClosing()";
		pyjamas.Timer.__track_lines__[2] = "pyjamas.Timer.py, line 2:\n    timers = []";
		pyjamas.Timer.__track_lines__[4] = "pyjamas.Timer.py, line 4:\n    class Timer:";
		pyjamas.Timer.__track_lines__[7] = "pyjamas.Timer.py, line 7:\n    def __init__(self, delay = 0, object = None):";
		pyjamas.Timer.__track_lines__[8] = "pyjamas.Timer.py, line 8:\n    self.isRepeating = False";
		pyjamas.Timer.__track_lines__[9] = "pyjamas.Timer.py, line 9:\n    self.timerId = 0";
		pyjamas.Timer.__track_lines__[11] = "pyjamas.Timer.py, line 11:\n    self.listener = object";
		pyjamas.Timer.__track_lines__[12] = "pyjamas.Timer.py, line 12:\n    if delay >= Timer.MIN_PERIOD:";
		pyjamas.Timer.__track_lines__[13] = "pyjamas.Timer.py, line 13:\n    self.schedule(delay)";
		pyjamas.Timer.__track_lines__[15] = "pyjamas.Timer.py, line 15:\n    def clearInterval(self, id):";
		pyjamas.Timer.__track_lines__[18] = "pyjamas.Timer.py, line 16:\n    JS(\"\"\" ... \"\"\")";
		pyjamas.Timer.__track_lines__[20] = "pyjamas.Timer.py, line 20:\n    def clearTimeout(self, id):";
		pyjamas.Timer.__track_lines__[23] = "pyjamas.Timer.py, line 21:\n    JS(\"\"\" ... \"\"\")";
		pyjamas.Timer.__track_lines__[25] = "pyjamas.Timer.py, line 25:\n    def createInterval(self, timer, period):";
		pyjamas.Timer.__track_lines__[28] = "pyjamas.Timer.py, line 26:\n    JS(\"\"\" ... \"\"\")";
		pyjamas.Timer.__track_lines__[30] = "pyjamas.Timer.py, line 30:\n    def createTimeout(self, timer, delay):";
		pyjamas.Timer.__track_lines__[33] = "pyjamas.Timer.py, line 31:\n    JS(\"\"\" ... \"\"\")";
		pyjamas.Timer.__track_lines__[36] = "pyjamas.Timer.py, line 36:\n    def hookWindowClosing(self):";
		pyjamas.Timer.__track_lines__[37] = "pyjamas.Timer.py, line 37:\n    pass";
		pyjamas.Timer.__track_lines__[39] = "pyjamas.Timer.py, line 39:\n    def cancel(self):";
		pyjamas.Timer.__track_lines__[40] = "pyjamas.Timer.py, line 40:\n    global timers";
		pyjamas.Timer.__track_lines__[42] = "pyjamas.Timer.py, line 42:\n    if self.isRepeating:";
		pyjamas.Timer.__track_lines__[43] = "pyjamas.Timer.py, line 43:\n    self.clearInterval(self.timerId)";
		pyjamas.Timer.__track_lines__[45] = "pyjamas.Timer.py, line 45:\n    self.clearTimeout(self.timerId)";
		pyjamas.Timer.__track_lines__[46] = "pyjamas.Timer.py, line 46:\n    timers.remove(self)";
		pyjamas.Timer.__track_lines__[48] = "pyjamas.Timer.py, line 48:\n    def run(self):";
		pyjamas.Timer.__track_lines__[49] = "pyjamas.Timer.py, line 49:\n    self.listener.onTimer(self.timerId)";
		pyjamas.Timer.__track_lines__[51] = "pyjamas.Timer.py, line 51:\n    def schedule(self, delayMillis):";
		pyjamas.Timer.__track_lines__[52] = "pyjamas.Timer.py, line 52:\n    global timers";
		pyjamas.Timer.__track_lines__[54] = "pyjamas.Timer.py, line 54:\n    if delayMillis < Timer.MIN_PERIOD:";
		pyjamas.Timer.__track_lines__[55] = "pyjamas.Timer.py, line 55:\n    alert(\"Timer delay must be positive\")";
		pyjamas.Timer.__track_lines__[56] = "pyjamas.Timer.py, line 56:\n    self.cancel()";
		pyjamas.Timer.__track_lines__[57] = "pyjamas.Timer.py, line 57:\n    self.isRepeating = False";
		pyjamas.Timer.__track_lines__[58] = "pyjamas.Timer.py, line 58:\n    self.timerId = self.createTimeout(self, delayMillis)";
		pyjamas.Timer.__track_lines__[59] = "pyjamas.Timer.py, line 59:\n    timers.append(self)";
		pyjamas.Timer.__track_lines__[61] = "pyjamas.Timer.py, line 61:\n    def scheduleRepeating(self, periodMillis):";
		pyjamas.Timer.__track_lines__[62] = "pyjamas.Timer.py, line 62:\n    global timers";
		pyjamas.Timer.__track_lines__[64] = "pyjamas.Timer.py, line 64:\n    if periodMillis < Timer.MIN_PERIOD:";
		pyjamas.Timer.__track_lines__[65] = "pyjamas.Timer.py, line 65:\n    alert(\"Timer period must be positive\")";
		pyjamas.Timer.__track_lines__[66] = "pyjamas.Timer.py, line 66:\n    self.cancel()";
		pyjamas.Timer.__track_lines__[67] = "pyjamas.Timer.py, line 67:\n    self.isRepeating = True";
		pyjamas.Timer.__track_lines__[68] = "pyjamas.Timer.py, line 68:\n    self.timerId = self.createInterval(self, periodMillis)";
		pyjamas.Timer.__track_lines__[69] = "pyjamas.Timer.py, line 69:\n    timers.append(self)";
		pyjamas.Timer.__track_lines__[72] = "pyjamas.Timer.py, line 72:\n    def fire(self):";
		pyjamas.Timer.__track_lines__[73] = "pyjamas.Timer.py, line 73:\n    self.fireImpl()";
		pyjamas.Timer.__track_lines__[75] = "pyjamas.Timer.py, line 75:\n    def fireImpl(self):";
		pyjamas.Timer.__track_lines__[76] = "pyjamas.Timer.py, line 76:\n    global timers";
		pyjamas.Timer.__track_lines__[78] = "pyjamas.Timer.py, line 78:\n    if not self.isRepeating:";
		pyjamas.Timer.__track_lines__[79] = "pyjamas.Timer.py, line 79:\n    timers.remove(self)";
		pyjamas.Timer.__track_lines__[81] = "pyjamas.Timer.py, line 81:\n    self.run()";
		pyjamas.Timer.__track_lines__[83] = "pyjamas.Timer.py, line 83:\n    def getID(self):";
		pyjamas.Timer.__track_lines__[84] = "pyjamas.Timer.py, line 84:\n    return self.timerId";
	try {
		track.module='pyjamas.Timer';
		track.lineno=1;
		track.lineno=2;
		pyjamas.Timer.timers = new pyjslib.List([]);
		track.lineno=4;
		pyjamas.Timer.Timer = (function(){
			var cls_instance = pyjs__class_instance('Timer');
			var cls_definition = new Object();
			cls_definition.__md5__ = '2389f34adc06cd14b1847194dd84d8e2';
			cls_definition.MIN_PERIOD = 1
			cls_definition.__init__ = pyjs__bind_method(cls_instance, '__init__', function(delay, object) {
				if (this.__is_instance__ === true) {
					var self = this;
					if (pyjs_options.arg_count && (arguments.length < 0 || arguments.length > 2)) pyjs__exception_func_param(arguments.callee.__name__, 1, 3, arguments.length+1);
				} else {
					var self = arguments[0];
					delay = arguments[1];
					object = arguments[2];
					if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					if (pyjs_options.arg_count && (arguments.length < 1 || arguments.length > 3)) pyjs__exception_func_param(arguments.callee.__name__, 1, 3, arguments.length);
				}
				if (pyjs_options.arg_instance_type) {
					if (self.prototype.__md5__ !== '2389f34adc06cd14b1847194dd84d8e2') {
						if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
							pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
						}
					}
				}
				if (typeof delay == 'undefined') delay=0;
				if (typeof object == 'undefined') object=null;
				track={module:pyjamas.Timer, lineno:7};trackstack.push(track);
				track.module='pyjamas.Timer';
				track.lineno=7;
				track.lineno=8;
				self.isRepeating = false;
				track.lineno=9;
				self.timerId = 0;
				track.lineno=11;
				self.listener = object;
				track.lineno=12;
				if (pyjslib.bool((pyjslib.cmp(delay, (pyjamas.Timer.Timer.MIN_PERIOD===undefined?(function(){throw new TypeError('pyjamas.Timer.Timer.MIN_PERIOD is undefined')})():(typeof pyjamas.Timer.Timer.MIN_PERIOD == 'function' && pyjamas.Timer.Timer.__is_instance__?pyjslib.getattr(pyjamas.Timer.Timer, 'MIN_PERIOD'):pyjamas.Timer.Timer.MIN_PERIOD))) != -1))) {
					track.lineno=13;
					self.schedule(delay);
				}
				trackstack.pop();track=trackstack.pop();trackstack.push(track);
				return null;
			}
			, function ( __kwargs, delay, object ) {
				if (typeof delay == 'undefined') {
					delay=__kwargs.delay;
					delete __kwargs.delay;
				} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.delay != 'undefined') {
					pyjs__exception_func_multiple_values('__init__', 'delay');
				}
				if (typeof object == 'undefined') {
					object=__kwargs.object;
					delete __kwargs.object;
				} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.object != 'undefined') {
					pyjs__exception_func_multiple_values('__init__', 'object');
				}
				if (pyjs_options.arg_kwarg_unexpected_keyword) {
					for (var i in __kwargs) {
						pyjs__exception_func_unexpected_keyword('__init__', i);
					}
				}
				var __r = [delay, object];
				for (var pyjs__va_arg = 3;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
					__r.push(arguments[pyjs__va_arg]);
				}

				return __r;
			});
			cls_definition.clearInterval = pyjs__bind_method(cls_instance, 'clearInterval', function(id) {
				if (this.__is_instance__ === true) {
					var self = this;
					if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 2, 2, arguments.length+1);
				} else {
					var self = arguments[0];
					id = arguments[1];
					if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					if (pyjs_options.arg_count && arguments.length != 2) pyjs__exception_func_param(arguments.callee.__name__, 2, 2, arguments.length);
				}
				if (pyjs_options.arg_instance_type) {
					if (self.prototype.__md5__ !== '2389f34adc06cd14b1847194dd84d8e2') {
						if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
							pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
						}
					}
				}
				track={module:pyjamas.Timer, lineno:15};trackstack.push(track);
				track.module='pyjamas.Timer';
				track.lineno=15;
				track.lineno=18;

        $wnd.clearInterval(id);
        
				trackstack.pop();track=trackstack.pop();trackstack.push(track);
			}
			, function ( __kwargs, id ) {
				if (typeof id == 'undefined') {
					id=__kwargs.id;
					delete __kwargs.id;
				} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.id != 'undefined') {
					pyjs__exception_func_multiple_values('clearInterval', 'id');
				}
				if (pyjs_options.arg_kwarg_unexpected_keyword) {
					for (var i in __kwargs) {
						pyjs__exception_func_unexpected_keyword('clearInterval', i);
					}
				}
				var __r = [id];
				for (var pyjs__va_arg = 2;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
					__r.push(arguments[pyjs__va_arg]);
				}

				return __r;
			});
			cls_definition.clearTimeout = pyjs__bind_method(cls_instance, 'clearTimeout', function(id) {
				if (this.__is_instance__ === true) {
					var self = this;
					if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 2, 2, arguments.length+1);
				} else {
					var self = arguments[0];
					id = arguments[1];
					if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					if (pyjs_options.arg_count && arguments.length != 2) pyjs__exception_func_param(arguments.callee.__name__, 2, 2, arguments.length);
				}
				if (pyjs_options.arg_instance_type) {
					if (self.prototype.__md5__ !== '2389f34adc06cd14b1847194dd84d8e2') {
						if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
							pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
						}
					}
				}
				track={module:pyjamas.Timer, lineno:20};trackstack.push(track);
				track.module='pyjamas.Timer';
				track.lineno=20;
				track.lineno=23;

        $wnd.clearTimeout(id);
        
				trackstack.pop();track=trackstack.pop();trackstack.push(track);
			}
			, function ( __kwargs, id ) {
				if (typeof id == 'undefined') {
					id=__kwargs.id;
					delete __kwargs.id;
				} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.id != 'undefined') {
					pyjs__exception_func_multiple_values('clearTimeout', 'id');
				}
				if (pyjs_options.arg_kwarg_unexpected_keyword) {
					for (var i in __kwargs) {
						pyjs__exception_func_unexpected_keyword('clearTimeout', i);
					}
				}
				var __r = [id];
				for (var pyjs__va_arg = 2;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
					__r.push(arguments[pyjs__va_arg]);
				}

				return __r;
			});
			cls_definition.createInterval = pyjs__bind_method(cls_instance, 'createInterval', function(timer, period) {
				if (this.__is_instance__ === true) {
					var self = this;
					if (pyjs_options.arg_count && arguments.length != 2) pyjs__exception_func_param(arguments.callee.__name__, 3, 3, arguments.length+1);
				} else {
					var self = arguments[0];
					timer = arguments[1];
					period = arguments[2];
					if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					if (pyjs_options.arg_count && arguments.length != 3) pyjs__exception_func_param(arguments.callee.__name__, 3, 3, arguments.length);
				}
				if (pyjs_options.arg_instance_type) {
					if (self.prototype.__md5__ !== '2389f34adc06cd14b1847194dd84d8e2') {
						if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
							pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
						}
					}
				}

        return $wnd.setInterval(function() { timer.fire(); }, period);
        
			}
			, function ( __kwargs, timer, period ) {
				if (typeof timer == 'undefined') {
					timer=__kwargs.timer;
					delete __kwargs.timer;
				} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.timer != 'undefined') {
					pyjs__exception_func_multiple_values('createInterval', 'timer');
				}
				if (typeof period == 'undefined') {
					period=__kwargs.period;
					delete __kwargs.period;
				} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.period != 'undefined') {
					pyjs__exception_func_multiple_values('createInterval', 'period');
				}
				if (pyjs_options.arg_kwarg_unexpected_keyword) {
					for (var i in __kwargs) {
						pyjs__exception_func_unexpected_keyword('createInterval', i);
					}
				}
				var __r = [timer, period];
				for (var pyjs__va_arg = 3;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
					__r.push(arguments[pyjs__va_arg]);
				}

				return __r;
			});
			cls_definition.createTimeout = pyjs__bind_method(cls_instance, 'createTimeout', function(timer, delay) {
				if (this.__is_instance__ === true) {
					var self = this;
					if (pyjs_options.arg_count && arguments.length != 2) pyjs__exception_func_param(arguments.callee.__name__, 3, 3, arguments.length+1);
				} else {
					var self = arguments[0];
					timer = arguments[1];
					delay = arguments[2];
					if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					if (pyjs_options.arg_count && arguments.length != 3) pyjs__exception_func_param(arguments.callee.__name__, 3, 3, arguments.length);
				}
				if (pyjs_options.arg_instance_type) {
					if (self.prototype.__md5__ !== '2389f34adc06cd14b1847194dd84d8e2') {
						if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
							pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
						}
					}
				}

        return $wnd.setTimeout(function() { timer.fire(); }, delay);
        
			}
			, function ( __kwargs, timer, delay ) {
				if (typeof timer == 'undefined') {
					timer=__kwargs.timer;
					delete __kwargs.timer;
				} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.timer != 'undefined') {
					pyjs__exception_func_multiple_values('createTimeout', 'timer');
				}
				if (typeof delay == 'undefined') {
					delay=__kwargs.delay;
					delete __kwargs.delay;
				} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.delay != 'undefined') {
					pyjs__exception_func_multiple_values('createTimeout', 'delay');
				}
				if (pyjs_options.arg_kwarg_unexpected_keyword) {
					for (var i in __kwargs) {
						pyjs__exception_func_unexpected_keyword('createTimeout', i);
					}
				}
				var __r = [timer, delay];
				for (var pyjs__va_arg = 3;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
					__r.push(arguments[pyjs__va_arg]);
				}

				return __r;
			});
			cls_definition.hookWindowClosing = pyjs__bind_method(cls_instance, 'hookWindowClosing', function() {
				if (this.__is_instance__ === true) {
					var self = this;
					if (pyjs_options.arg_count && arguments.length != 0) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length+1);
				} else {
					var self = arguments[0];
					if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length);
				}
				if (pyjs_options.arg_instance_type) {
					if (self.prototype.__md5__ !== '2389f34adc06cd14b1847194dd84d8e2') {
						if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
							pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
						}
					}
				}
				track={module:pyjamas.Timer, lineno:36};trackstack.push(track);
				track.module='pyjamas.Timer';
				track.lineno=36;
				track.lineno=37;
				trackstack.pop();track=trackstack.pop();trackstack.push(track);
				return null;
			}
			, function ( __kwargs ) {
				if (pyjs_options.arg_kwarg_unexpected_keyword) {
					for (var i in __kwargs) {
						pyjs__exception_func_unexpected_keyword('hookWindowClosing', i);
					}
				}
				var __r = [];
				for (var pyjs__va_arg = 1;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
					__r.push(arguments[pyjs__va_arg]);
				}

				return __r;
			});
			cls_definition.cancel = pyjs__bind_method(cls_instance, 'cancel', function() {
				if (this.__is_instance__ === true) {
					var self = this;
					if (pyjs_options.arg_count && arguments.length != 0) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length+1);
				} else {
					var self = arguments[0];
					if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length);
				}
				if (pyjs_options.arg_instance_type) {
					if (self.prototype.__md5__ !== '2389f34adc06cd14b1847194dd84d8e2') {
						if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
							pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
						}
					}
				}
				track={module:pyjamas.Timer, lineno:39};trackstack.push(track);
				track.module='pyjamas.Timer';
				track.lineno=39;
				track.lineno=40;
				track.lineno=42;
				if (pyjslib.bool((self.isRepeating===undefined?(function(){throw new TypeError('self.isRepeating is undefined')})():(typeof self.isRepeating == 'function' && self.__is_instance__?pyjslib.getattr(self, 'isRepeating'):self.isRepeating)))) {
					track.lineno=43;
					self.clearInterval((self.timerId===undefined?(function(){throw new TypeError('self.timerId is undefined')})():(typeof self.timerId == 'function' && self.__is_instance__?pyjslib.getattr(self, 'timerId'):self.timerId)));
				}
				else {
					track.lineno=45;
					self.clearTimeout((self.timerId===undefined?(function(){throw new TypeError('self.timerId is undefined')})():(typeof self.timerId == 'function' && self.__is_instance__?pyjslib.getattr(self, 'timerId'):self.timerId)));
				}
				track.lineno=46;
				pyjamas.Timer.timers.remove(self);
				trackstack.pop();track=trackstack.pop();trackstack.push(track);
				return null;
			}
			, function ( __kwargs ) {
				if (pyjs_options.arg_kwarg_unexpected_keyword) {
					for (var i in __kwargs) {
						pyjs__exception_func_unexpected_keyword('cancel', i);
					}
				}
				var __r = [];
				for (var pyjs__va_arg = 1;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
					__r.push(arguments[pyjs__va_arg]);
				}

				return __r;
			});
			cls_definition.run = pyjs__bind_method(cls_instance, 'run', function() {
				if (this.__is_instance__ === true) {
					var self = this;
					if (pyjs_options.arg_count && arguments.length != 0) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length+1);
				} else {
					var self = arguments[0];
					if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length);
				}
				if (pyjs_options.arg_instance_type) {
					if (self.prototype.__md5__ !== '2389f34adc06cd14b1847194dd84d8e2') {
						if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
							pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
						}
					}
				}
				track={module:pyjamas.Timer, lineno:48};trackstack.push(track);
				track.module='pyjamas.Timer';
				track.lineno=48;
				track.lineno=49;
				self.listener.onTimer((self.timerId===undefined?(function(){throw new TypeError('self.timerId is undefined')})():(typeof self.timerId == 'function' && self.__is_instance__?pyjslib.getattr(self, 'timerId'):self.timerId)));
				trackstack.pop();track=trackstack.pop();trackstack.push(track);
				return null;
			}
			, function ( __kwargs ) {
				if (pyjs_options.arg_kwarg_unexpected_keyword) {
					for (var i in __kwargs) {
						pyjs__exception_func_unexpected_keyword('run', i);
					}
				}
				var __r = [];
				for (var pyjs__va_arg = 1;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
					__r.push(arguments[pyjs__va_arg]);
				}

				return __r;
			});
			cls_definition.schedule = pyjs__bind_method(cls_instance, 'schedule', function(delayMillis) {
				if (this.__is_instance__ === true) {
					var self = this;
					if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 2, 2, arguments.length+1);
				} else {
					var self = arguments[0];
					delayMillis = arguments[1];
					if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					if (pyjs_options.arg_count && arguments.length != 2) pyjs__exception_func_param(arguments.callee.__name__, 2, 2, arguments.length);
				}
				if (pyjs_options.arg_instance_type) {
					if (self.prototype.__md5__ !== '2389f34adc06cd14b1847194dd84d8e2') {
						if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
							pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
						}
					}
				}
				track={module:pyjamas.Timer, lineno:51};trackstack.push(track);
				track.module='pyjamas.Timer';
				track.lineno=51;
				track.lineno=52;
				track.lineno=54;
				if (pyjslib.bool((pyjslib.cmp(delayMillis, (pyjamas.Timer.Timer.MIN_PERIOD===undefined?(function(){throw new TypeError('pyjamas.Timer.Timer.MIN_PERIOD is undefined')})():(typeof pyjamas.Timer.Timer.MIN_PERIOD == 'function' && pyjamas.Timer.Timer.__is_instance__?pyjslib.getattr(pyjamas.Timer.Timer, 'MIN_PERIOD'):pyjamas.Timer.Timer.MIN_PERIOD))) == -1))) {
					track.lineno=55;
					alert(String('Timer delay must be positive'));
				}
				track.lineno=56;
				self.cancel();
				track.lineno=57;
				self.isRepeating = false;
				track.lineno=58;
				self.timerId = self.createTimeout(self, delayMillis);
				track.lineno=59;
				pyjamas.Timer.timers.append(self);
				trackstack.pop();track=trackstack.pop();trackstack.push(track);
				return null;
			}
			, function ( __kwargs, delayMillis ) {
				if (typeof delayMillis == 'undefined') {
					delayMillis=__kwargs.delayMillis;
					delete __kwargs.delayMillis;
				} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.delayMillis != 'undefined') {
					pyjs__exception_func_multiple_values('schedule', 'delayMillis');
				}
				if (pyjs_options.arg_kwarg_unexpected_keyword) {
					for (var i in __kwargs) {
						pyjs__exception_func_unexpected_keyword('schedule', i);
					}
				}
				var __r = [delayMillis];
				for (var pyjs__va_arg = 2;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
					__r.push(arguments[pyjs__va_arg]);
				}

				return __r;
			});
			cls_definition.scheduleRepeating = pyjs__bind_method(cls_instance, 'scheduleRepeating', function(periodMillis) {
				if (this.__is_instance__ === true) {
					var self = this;
					if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 2, 2, arguments.length+1);
				} else {
					var self = arguments[0];
					periodMillis = arguments[1];
					if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					if (pyjs_options.arg_count && arguments.length != 2) pyjs__exception_func_param(arguments.callee.__name__, 2, 2, arguments.length);
				}
				if (pyjs_options.arg_instance_type) {
					if (self.prototype.__md5__ !== '2389f34adc06cd14b1847194dd84d8e2') {
						if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
							pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
						}
					}
				}
				track={module:pyjamas.Timer, lineno:61};trackstack.push(track);
				track.module='pyjamas.Timer';
				track.lineno=61;
				track.lineno=62;
				track.lineno=64;
				if (pyjslib.bool((pyjslib.cmp(periodMillis, (pyjamas.Timer.Timer.MIN_PERIOD===undefined?(function(){throw new TypeError('pyjamas.Timer.Timer.MIN_PERIOD is undefined')})():(typeof pyjamas.Timer.Timer.MIN_PERIOD == 'function' && pyjamas.Timer.Timer.__is_instance__?pyjslib.getattr(pyjamas.Timer.Timer, 'MIN_PERIOD'):pyjamas.Timer.Timer.MIN_PERIOD))) == -1))) {
					track.lineno=65;
					alert(String('Timer period must be positive'));
				}
				track.lineno=66;
				self.cancel();
				track.lineno=67;
				self.isRepeating = true;
				track.lineno=68;
				self.timerId = self.createInterval(self, periodMillis);
				track.lineno=69;
				pyjamas.Timer.timers.append(self);
				trackstack.pop();track=trackstack.pop();trackstack.push(track);
				return null;
			}
			, function ( __kwargs, periodMillis ) {
				if (typeof periodMillis == 'undefined') {
					periodMillis=__kwargs.periodMillis;
					delete __kwargs.periodMillis;
				} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.periodMillis != 'undefined') {
					pyjs__exception_func_multiple_values('scheduleRepeating', 'periodMillis');
				}
				if (pyjs_options.arg_kwarg_unexpected_keyword) {
					for (var i in __kwargs) {
						pyjs__exception_func_unexpected_keyword('scheduleRepeating', i);
					}
				}
				var __r = [periodMillis];
				for (var pyjs__va_arg = 2;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
					__r.push(arguments[pyjs__va_arg]);
				}

				return __r;
			});
			cls_definition.fire = pyjs__bind_method(cls_instance, 'fire', function() {
				if (this.__is_instance__ === true) {
					var self = this;
					if (pyjs_options.arg_count && arguments.length != 0) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length+1);
				} else {
					var self = arguments[0];
					if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length);
				}
				if (pyjs_options.arg_instance_type) {
					if (self.prototype.__md5__ !== '2389f34adc06cd14b1847194dd84d8e2') {
						if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
							pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
						}
					}
				}
				track={module:pyjamas.Timer, lineno:72};trackstack.push(track);
				track.module='pyjamas.Timer';
				track.lineno=72;
				track.lineno=73;
				self.fireImpl();
				trackstack.pop();track=trackstack.pop();trackstack.push(track);
				return null;
			}
			, function ( __kwargs ) {
				if (pyjs_options.arg_kwarg_unexpected_keyword) {
					for (var i in __kwargs) {
						pyjs__exception_func_unexpected_keyword('fire', i);
					}
				}
				var __r = [];
				for (var pyjs__va_arg = 1;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
					__r.push(arguments[pyjs__va_arg]);
				}

				return __r;
			});
			cls_definition.fireImpl = pyjs__bind_method(cls_instance, 'fireImpl', function() {
				if (this.__is_instance__ === true) {
					var self = this;
					if (pyjs_options.arg_count && arguments.length != 0) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length+1);
				} else {
					var self = arguments[0];
					if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length);
				}
				if (pyjs_options.arg_instance_type) {
					if (self.prototype.__md5__ !== '2389f34adc06cd14b1847194dd84d8e2') {
						if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
							pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
						}
					}
				}
				track={module:pyjamas.Timer, lineno:75};trackstack.push(track);
				track.module='pyjamas.Timer';
				track.lineno=75;
				track.lineno=76;
				track.lineno=78;
				if (pyjslib.bool(!((self.isRepeating===undefined?(function(){throw new TypeError('self.isRepeating is undefined')})():(typeof self.isRepeating == 'function' && self.__is_instance__?pyjslib.getattr(self, 'isRepeating'):self.isRepeating))))) {
					track.lineno=79;
					pyjamas.Timer.timers.remove(self);
				}
				track.lineno=81;
				self.run();
				trackstack.pop();track=trackstack.pop();trackstack.push(track);
				return null;
			}
			, function ( __kwargs ) {
				if (pyjs_options.arg_kwarg_unexpected_keyword) {
					for (var i in __kwargs) {
						pyjs__exception_func_unexpected_keyword('fireImpl', i);
					}
				}
				var __r = [];
				for (var pyjs__va_arg = 1;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
					__r.push(arguments[pyjs__va_arg]);
				}

				return __r;
			});
			cls_definition.getID = pyjs__bind_method(cls_instance, 'getID', function() {
				if (this.__is_instance__ === true) {
					var self = this;
					if (pyjs_options.arg_count && arguments.length != 0) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length+1);
				} else {
					var self = arguments[0];
					if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length);
				}
				if (pyjs_options.arg_instance_type) {
					if (self.prototype.__md5__ !== '2389f34adc06cd14b1847194dd84d8e2') {
						if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
							pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
						}
					}
				}
				track={module:pyjamas.Timer, lineno:83};trackstack.push(track);
				track.module='pyjamas.Timer';
				track.lineno=83;
				track.lineno=84;
				track.lineno=84;
				var pyjs__ret = (self.timerId===undefined?(function(){throw new TypeError('self.timerId is undefined')})():(typeof self.timerId == 'function' && self.__is_instance__?pyjslib.getattr(self, 'timerId'):self.timerId));
				trackstack.pop();track=trackstack.pop();trackstack.push(track);
				return pyjs__ret;
			}
			, function ( __kwargs ) {
				if (pyjs_options.arg_kwarg_unexpected_keyword) {
					for (var i in __kwargs) {
						pyjs__exception_func_unexpected_keyword('getID', i);
					}
				}
				var __r = [];
				for (var pyjs__va_arg = 1;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
					__r.push(arguments[pyjs__va_arg]);
				}

				return __r;
			});
			return pyjs__class_function(cls_instance, cls_definition, 
			                            new Array(pyjslib.object));
		})();

	} catch (pyjs_attr_err) {throw pyjslib._errorMapping(pyjs_attr_err)};
return this;
}; /* end pyjamas.Timer */ 




pyjamas.Timer_loaded_fn = function() {
}

pyjamas.Timer_prepare_mod = function() {
    if ((typeof (module_load_request['pyjamas.Timer']) == 'undefined') ||
        (module_load_request['pyjamas.Timer'] < 2)) {
        module_load_request['pyjamas.Timer'] = 2;
    }
    var modnames = new pyjslib.List([
		new pyjslib.List([
			'pyjamas']),
		new pyjslib.List([
			])
	]);
    sys.overrides.update(new pyjslib.Dict({
		'mozilla.pyjslib': 'mozilla.pyjslib',
		'mozilla.pyjamas.DOM': 'mozilla.pyjamas.DOM'
	}));
    path = sys.loadpath;
    /*
    pyjslib.preload_app_modules(path, modnames, pyjamas.Timer_loaded_fn,
                                            0,
                                            null);
                                            //'pyjamas.Timer');
                                            */
    //alert("module ajax loaded fn called pyjamas.Timer");

    if (sys.appname != 'pyjamas.Timer')
    {
        if (module_load_request['pyjamas.Timer'] < 3) {
            module_load_request['pyjamas.Timer'] = 3;
        }
    }
}

//alert("module ajax loaded pyjamas.Timer");

pyjamas.Timer_prepare_mod();


// pyjamas.ui

// module libs (usually imported javascript)



// module code

pyjamas.ui = function (__mod_name__) {
	if(pyjamas.ui.__was_initialized__) return;
	pyjamas.ui.__was_initialized__ = true;
	if (__mod_name__ == null) __mod_name__ = 'pyjamas.ui';
	var __name__ = pyjamas.ui.__name__ = __mod_name__;
	pyjamas.ui.__track_lines__ = new Array();
	var ui = pyjamas.ui;

		pyjamas.ui.__track_lines__[1] = "pyjamas.ui.py, line 1:\n    # Copyright 2006 James Tauber and contributors";
		pyjamas.ui.__track_lines__[20] = "pyjamas.ui.py, line 20:\n    class HasVerticalAlignment:";
		pyjamas.ui.__track_lines__[25] = "pyjamas.ui.py, line 25:\n    class HasAlignment:";
		pyjamas.ui.__track_lines__[15] = "pyjamas.ui.py, line 15:\n    class HasHorizontalAlignment:";
	try {
		track.module='pyjamas.ui';
		track.lineno=1;
		track.lineno=15;
		pyjamas.ui.HasHorizontalAlignment = (function(){
			var cls_instance = pyjs__class_instance('HasHorizontalAlignment');
			var cls_definition = new Object();
			cls_definition.__md5__ = 'e45edcb0187fe4a87d2ea9f1e52d27d8';
			cls_definition.ALIGN_LEFT = String('left')
			cls_definition.ALIGN_CENTER = String('center')
			cls_definition.ALIGN_RIGHT = String('right')
			return pyjs__class_function(cls_instance, cls_definition, 
			                            new Array(pyjslib.object));
		})();
		track.lineno=20;
		pyjamas.ui.HasVerticalAlignment = (function(){
			var cls_instance = pyjs__class_instance('HasVerticalAlignment');
			var cls_definition = new Object();
			cls_definition.__md5__ = '5cff644cb7b08fbcaea5a22133aa961f';
			cls_definition.ALIGN_TOP = String('top')
			cls_definition.ALIGN_MIDDLE = String('middle')
			cls_definition.ALIGN_BOTTOM = String('bottom')
			return pyjs__class_function(cls_instance, cls_definition, 
			                            new Array(pyjslib.object));
		})();
		track.lineno=25;
		pyjamas.ui.HasAlignment = (function(){
			var cls_instance = pyjs__class_instance('HasAlignment');
			var cls_definition = new Object();
			cls_definition.__md5__ = '4ee407761ebd6711291950471d33db8e';
			cls_definition.ALIGN_BOTTOM = String('bottom')
			cls_definition.ALIGN_MIDDLE = String('middle')
			cls_definition.ALIGN_TOP = String('top')
			cls_definition.ALIGN_CENTER = String('center')
			cls_definition.ALIGN_LEFT = String('left')
			cls_definition.ALIGN_RIGHT = String('right')
			return pyjs__class_function(cls_instance, cls_definition, 
			                            new Array(pyjslib.object));
		})();

	} catch (pyjs_attr_err) {throw pyjslib._errorMapping(pyjs_attr_err)};
return this;
}; /* end pyjamas.ui */ 




pyjamas.ui_loaded_fn = function() {
}

pyjamas.ui_prepare_mod = function() {
    if ((typeof (module_load_request['pyjamas.ui']) == 'undefined') ||
        (module_load_request['pyjamas.ui'] < 2)) {
        module_load_request['pyjamas.ui'] = 2;
    }
    var modnames = new pyjslib.List([
		new pyjslib.List([
			'pyjamas']),
		new pyjslib.List([
			])
	]);
    sys.overrides.update(new pyjslib.Dict({
		'mozilla.pyjslib': 'mozilla.pyjslib',
		'mozilla.pyjamas.DOM': 'mozilla.pyjamas.DOM'
	}));
    path = sys.loadpath;
    /*
    pyjslib.preload_app_modules(path, modnames, pyjamas.ui_loaded_fn,
                                            0,
                                            null);
                                            //'pyjamas.ui');
                                            */
    //alert("module ajax loaded fn called pyjamas.ui");

    if (sys.appname != 'pyjamas.ui')
    {
        if (module_load_request['pyjamas.ui'] < 3) {
            module_load_request['pyjamas.ui'] = 3;
        }
    }
}

//alert("module ajax loaded pyjamas.ui");

pyjamas.ui_prepare_mod();


// pyjamas.ui.KeyboardListener

// module libs (usually imported javascript)



// module code

pyjamas.ui.KeyboardListener = function (__mod_name__) {
	if(pyjamas.ui.KeyboardListener.__was_initialized__) return;
	pyjamas.ui.KeyboardListener.__was_initialized__ = true;
	if (__mod_name__ == null) __mod_name__ = 'pyjamas.ui.KeyboardListener';
	var __name__ = pyjamas.ui.KeyboardListener.__name__ = __mod_name__;
	pyjamas.ui.KeyboardListener.__track_lines__ = new Array();
	var KeyboardListener = pyjamas.ui.KeyboardListener;

		pyjamas.ui.KeyboardListener.__track_lines__[1] = "pyjamas.ui.KeyboardListener.py, line 1:\n    # Copyright 2006 James Tauber and contributors";
		pyjamas.ui.KeyboardListener.__track_lines__[14] = "pyjamas.ui.KeyboardListener.py, line 14:\n    from pyjamas import DOM";
		pyjamas.ui.KeyboardListener.__track_lines__[17] = "pyjamas.ui.KeyboardListener.py, line 17:\n    KEY_ALT = 18";
		pyjamas.ui.KeyboardListener.__track_lines__[18] = "pyjamas.ui.KeyboardListener.py, line 18:\n    KEY_BACKSPACE = 8";
		pyjamas.ui.KeyboardListener.__track_lines__[19] = "pyjamas.ui.KeyboardListener.py, line 19:\n    KEY_CTRL = 17";
		pyjamas.ui.KeyboardListener.__track_lines__[20] = "pyjamas.ui.KeyboardListener.py, line 20:\n    KEY_DELETE = 46";
		pyjamas.ui.KeyboardListener.__track_lines__[21] = "pyjamas.ui.KeyboardListener.py, line 21:\n    KEY_DOWN = 40";
		pyjamas.ui.KeyboardListener.__track_lines__[22] = "pyjamas.ui.KeyboardListener.py, line 22:\n    KEY_END = 35";
		pyjamas.ui.KeyboardListener.__track_lines__[23] = "pyjamas.ui.KeyboardListener.py, line 23:\n    KEY_ENTER = 13";
		pyjamas.ui.KeyboardListener.__track_lines__[24] = "pyjamas.ui.KeyboardListener.py, line 24:\n    KEY_ESCAPE = 27";
		pyjamas.ui.KeyboardListener.__track_lines__[25] = "pyjamas.ui.KeyboardListener.py, line 25:\n    KEY_HOME = 36";
		pyjamas.ui.KeyboardListener.__track_lines__[26] = "pyjamas.ui.KeyboardListener.py, line 26:\n    KEY_LEFT = 37";
		pyjamas.ui.KeyboardListener.__track_lines__[27] = "pyjamas.ui.KeyboardListener.py, line 27:\n    KEY_PAGEDOWN = 34";
		pyjamas.ui.KeyboardListener.__track_lines__[28] = "pyjamas.ui.KeyboardListener.py, line 28:\n    KEY_PAGEUP = 33";
		pyjamas.ui.KeyboardListener.__track_lines__[29] = "pyjamas.ui.KeyboardListener.py, line 29:\n    KEY_RIGHT = 39";
		pyjamas.ui.KeyboardListener.__track_lines__[30] = "pyjamas.ui.KeyboardListener.py, line 30:\n    KEY_SHIFT = 16";
		pyjamas.ui.KeyboardListener.__track_lines__[31] = "pyjamas.ui.KeyboardListener.py, line 31:\n    KEY_TAB = 9";
		pyjamas.ui.KeyboardListener.__track_lines__[32] = "pyjamas.ui.KeyboardListener.py, line 32:\n    KEY_UP = 38";
		pyjamas.ui.KeyboardListener.__track_lines__[34] = "pyjamas.ui.KeyboardListener.py, line 34:\n    MODIFIER_ALT = 4";
		pyjamas.ui.KeyboardListener.__track_lines__[35] = "pyjamas.ui.KeyboardListener.py, line 35:\n    MODIFIER_CTRL = 2";
		pyjamas.ui.KeyboardListener.__track_lines__[36] = "pyjamas.ui.KeyboardListener.py, line 36:\n    MODIFIER_SHIFT = 1";
		pyjamas.ui.KeyboardListener.__track_lines__[38] = "pyjamas.ui.KeyboardListener.py, line 38:\n    def getKeyboardModifiers(event):";
		pyjamas.ui.KeyboardListener.__track_lines__[39] = "pyjamas.ui.KeyboardListener.py, line 39:\n    shift = 0";
		pyjamas.ui.KeyboardListener.__track_lines__[40] = "pyjamas.ui.KeyboardListener.py, line 40:\n    ctrl = 0";
		pyjamas.ui.KeyboardListener.__track_lines__[41] = "pyjamas.ui.KeyboardListener.py, line 41:\n    alt = 0";
		pyjamas.ui.KeyboardListener.__track_lines__[43] = "pyjamas.ui.KeyboardListener.py, line 43:\n    global MODIFIER_ALT";
		pyjamas.ui.KeyboardListener.__track_lines__[44] = "pyjamas.ui.KeyboardListener.py, line 44:\n    global MODIFIER_CTRL";
		pyjamas.ui.KeyboardListener.__track_lines__[45] = "pyjamas.ui.KeyboardListener.py, line 45:\n    global MODIFIER_SHIFT";
		pyjamas.ui.KeyboardListener.__track_lines__[47] = "pyjamas.ui.KeyboardListener.py, line 47:\n    if DOM.eventGetShiftKey(event):";
		pyjamas.ui.KeyboardListener.__track_lines__[48] = "pyjamas.ui.KeyboardListener.py, line 48:\n    shift = MODIFIER_SHIFT";
		pyjamas.ui.KeyboardListener.__track_lines__[50] = "pyjamas.ui.KeyboardListener.py, line 50:\n    if DOM.eventGetCtrlKey(event):";
		pyjamas.ui.KeyboardListener.__track_lines__[51] = "pyjamas.ui.KeyboardListener.py, line 51:\n    ctrl = MODIFIER_CTRL";
		pyjamas.ui.KeyboardListener.__track_lines__[53] = "pyjamas.ui.KeyboardListener.py, line 53:\n    if DOM.eventGetAltKey(event):";
		pyjamas.ui.KeyboardListener.__track_lines__[54] = "pyjamas.ui.KeyboardListener.py, line 54:\n    alt = MODIFIER_ALT";
		pyjamas.ui.KeyboardListener.__track_lines__[56] = "pyjamas.ui.KeyboardListener.py, line 56:\n    return shift | ctrl | alt";
		pyjamas.ui.KeyboardListener.__track_lines__[59] = "pyjamas.ui.KeyboardListener.py, line 59:\n    def fireKeyboardEvent(listeners, sender, event):";
		pyjamas.ui.KeyboardListener.__track_lines__[60] = "pyjamas.ui.KeyboardListener.py, line 60:\n    modifiers = getKeyboardModifiers(event)";
		pyjamas.ui.KeyboardListener.__track_lines__[62] = "pyjamas.ui.KeyboardListener.py, line 62:\n    type = DOM.eventGetType(event)";
		pyjamas.ui.KeyboardListener.__track_lines__[63] = "pyjamas.ui.KeyboardListener.py, line 63:\n    if type == \"keydown\":";
		pyjamas.ui.KeyboardListener.__track_lines__[64] = "pyjamas.ui.KeyboardListener.py, line 64:\n    for listener in listeners:";
		pyjamas.ui.KeyboardListener.__track_lines__[65] = "pyjamas.ui.KeyboardListener.py, line 65:\n    listener.onKeyDown(sender, DOM.eventGetKeyCode(event), modifiers)";
		pyjamas.ui.KeyboardListener.__track_lines__[67] = "pyjamas.ui.KeyboardListener.py, line 67:\n    for listener in listeners:";
		pyjamas.ui.KeyboardListener.__track_lines__[68] = "pyjamas.ui.KeyboardListener.py, line 68:\n    listener.onKeyUp(sender, DOM.eventGetKeyCode(event), modifiers)";
		pyjamas.ui.KeyboardListener.__track_lines__[70] = "pyjamas.ui.KeyboardListener.py, line 70:\n    for listener in listeners:";
		pyjamas.ui.KeyboardListener.__track_lines__[71] = "pyjamas.ui.KeyboardListener.py, line 71:\n    listener.onKeyPress(sender, DOM.eventGetKeyCode(event), modifiers)";
	try {
		track.module='pyjamas.ui.KeyboardListener';
		track.lineno=1;
		track.lineno=14;
		modules['pyjamas'] = pyjamas();
		pyjslib.import_module(sys.loadpath, 'pyjamas.ui.KeyboardListener', 'pyjamas', 0, false);
		track.module='pyjamas.ui.KeyboardListener';

		modules['pyjamas'] = pyjamas();
		pyjslib.import_module(sys.loadpath, 'pyjamas.ui.KeyboardListener', 'pyjamas', 0, false);
		track.module='pyjamas.ui.KeyboardListener';

		modules['pyjamas.DOM'] = pyjamas.DOM();
		pyjslib.import_module(sys.loadpath, 'pyjamas.ui.KeyboardListener', 'pyjamas.DOM', 0, false);
		track.module='pyjamas.ui.KeyboardListener';

		pyjamas.ui.KeyboardListener.DOM = pyjamas.DOM;
		track.lineno=17;
		pyjamas.ui.KeyboardListener.KEY_ALT = 18;
		track.lineno=18;
		pyjamas.ui.KeyboardListener.KEY_BACKSPACE = 8;
		track.lineno=19;
		pyjamas.ui.KeyboardListener.KEY_CTRL = 17;
		track.lineno=20;
		pyjamas.ui.KeyboardListener.KEY_DELETE = 46;
		track.lineno=21;
		pyjamas.ui.KeyboardListener.KEY_DOWN = 40;
		track.lineno=22;
		pyjamas.ui.KeyboardListener.KEY_END = 35;
		track.lineno=23;
		pyjamas.ui.KeyboardListener.KEY_ENTER = 13;
		track.lineno=24;
		pyjamas.ui.KeyboardListener.KEY_ESCAPE = 27;
		track.lineno=25;
		pyjamas.ui.KeyboardListener.KEY_HOME = 36;
		track.lineno=26;
		pyjamas.ui.KeyboardListener.KEY_LEFT = 37;
		track.lineno=27;
		pyjamas.ui.KeyboardListener.KEY_PAGEDOWN = 34;
		track.lineno=28;
		pyjamas.ui.KeyboardListener.KEY_PAGEUP = 33;
		track.lineno=29;
		pyjamas.ui.KeyboardListener.KEY_RIGHT = 39;
		track.lineno=30;
		pyjamas.ui.KeyboardListener.KEY_SHIFT = 16;
		track.lineno=31;
		pyjamas.ui.KeyboardListener.KEY_TAB = 9;
		track.lineno=32;
		pyjamas.ui.KeyboardListener.KEY_UP = 38;
		track.lineno=34;
		pyjamas.ui.KeyboardListener.MODIFIER_ALT = 4;
		track.lineno=35;
		pyjamas.ui.KeyboardListener.MODIFIER_CTRL = 2;
		track.lineno=36;
		pyjamas.ui.KeyboardListener.MODIFIER_SHIFT = 1;
		track.lineno=38;
		pyjamas.ui.KeyboardListener.getKeyboardModifiers = function(event) {
			if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length);
			track={module:'pyjamas.ui.KeyboardListener',lineno:38};trackstack.push(track);
			track.module='pyjamas.ui.KeyboardListener';
			track.lineno=38;
			track.lineno=39;
			var shift = 0;
			track.lineno=40;
			var ctrl = 0;
			track.lineno=41;
			var alt = 0;
			track.lineno=43;
			track.lineno=44;
			track.lineno=45;
			track.lineno=47;
			if (pyjslib.bool(pyjamas.ui.KeyboardListener.DOM.eventGetShiftKey(event))) {
				track.lineno=48;
				shift = pyjamas.ui.KeyboardListener.MODIFIER_SHIFT;
			}
			track.lineno=50;
			if (pyjslib.bool(pyjamas.ui.KeyboardListener.DOM.eventGetCtrlKey(event))) {
				track.lineno=51;
				ctrl = pyjamas.ui.KeyboardListener.MODIFIER_CTRL;
			}
			track.lineno=53;
			if (pyjslib.bool(pyjamas.ui.KeyboardListener.DOM.eventGetAltKey(event))) {
				track.lineno=54;
				alt = pyjamas.ui.KeyboardListener.MODIFIER_ALT;
			}
			track.lineno=56;
			track.lineno=56;
			var pyjs__ret = (shift | ctrl | alt);
			trackstack.pop();track=trackstack.pop();trackstack.push(track);
			return pyjs__ret;
		};
		pyjamas.ui.KeyboardListener.getKeyboardModifiers.__name__ = 'getKeyboardModifiers';

		pyjamas.ui.KeyboardListener.getKeyboardModifiers.parse_kwargs = function ( __kwargs, event ) {
			if (typeof event == 'undefined') {
				event=__kwargs.event;
				delete __kwargs.event;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.event != 'undefined') {
				pyjs__exception_func_multiple_values('pyjamas.ui.KeyboardListener.getKeyboardModifiers', 'event');
			}
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('pyjamas.ui.KeyboardListener.getKeyboardModifiers', i);
				}
			}
			var __r = [event];
			for (var pyjs__va_arg = 2;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		};
		track.lineno=59;
		pyjamas.ui.KeyboardListener.fireKeyboardEvent = function(listeners, sender, event) {
			if (pyjs_options.arg_count && arguments.length != 3) pyjs__exception_func_param(arguments.callee.__name__, 3, 3, arguments.length);
			track={module:'pyjamas.ui.KeyboardListener',lineno:59};trackstack.push(track);
			track.module='pyjamas.ui.KeyboardListener';
			track.lineno=59;
			track.lineno=60;
			var modifiers = pyjamas.ui.KeyboardListener.getKeyboardModifiers(event);
			track.lineno=62;
			var type = pyjamas.ui.KeyboardListener.DOM.eventGetType(event);
			track.lineno=63;
			if (pyjslib.bool(pyjslib.eq(type, String('keydown')))) {
				track.lineno=64;
				var pyjs__trackstack_size_1=trackstack.length;
				var __listener = listeners.__iter__();
				try {
					while (true) {
						var listener = __listener.next();
						
						track.lineno=65;
						listener.onKeyDown(sender, pyjamas.ui.KeyboardListener.DOM.eventGetKeyCode(event), modifiers);
					}
				} catch (e) {
					if (e.__name__ != 'StopIteration') {
						throw e;
					}
				}
				if (trackstack.length > pyjs__trackstack_size_1) {
					trackstack = trackstack.slice(0,pyjs__trackstack_size_1);
					track = trackstack.slice(-1)[0];
				}
				track.module='pyjamas.ui.KeyboardListener';
			}
			else if (pyjslib.bool(pyjslib.eq(type, String('keyup')))) {
				track.lineno=67;
				var pyjs__trackstack_size_1=trackstack.length;
				var __listener = listeners.__iter__();
				try {
					while (true) {
						var listener = __listener.next();
						
						track.lineno=68;
						listener.onKeyUp(sender, pyjamas.ui.KeyboardListener.DOM.eventGetKeyCode(event), modifiers);
					}
				} catch (e) {
					if (e.__name__ != 'StopIteration') {
						throw e;
					}
				}
				if (trackstack.length > pyjs__trackstack_size_1) {
					trackstack = trackstack.slice(0,pyjs__trackstack_size_1);
					track = trackstack.slice(-1)[0];
				}
				track.module='pyjamas.ui.KeyboardListener';
			}
			else if (pyjslib.bool(pyjslib.eq(type, String('keypress')))) {
				track.lineno=70;
				var pyjs__trackstack_size_1=trackstack.length;
				var __listener = listeners.__iter__();
				try {
					while (true) {
						var listener = __listener.next();
						
						track.lineno=71;
						listener.onKeyPress(sender, pyjamas.ui.KeyboardListener.DOM.eventGetKeyCode(event), modifiers);
					}
				} catch (e) {
					if (e.__name__ != 'StopIteration') {
						throw e;
					}
				}
				if (trackstack.length > pyjs__trackstack_size_1) {
					trackstack = trackstack.slice(0,pyjs__trackstack_size_1);
					track = trackstack.slice(-1)[0];
				}
				track.module='pyjamas.ui.KeyboardListener';
			}
			trackstack.pop();track=trackstack.pop();trackstack.push(track);
			return null;
		};
		pyjamas.ui.KeyboardListener.fireKeyboardEvent.__name__ = 'fireKeyboardEvent';

		pyjamas.ui.KeyboardListener.fireKeyboardEvent.parse_kwargs = function ( __kwargs, listeners, sender, event ) {
			if (typeof listeners == 'undefined') {
				listeners=__kwargs.listeners;
				delete __kwargs.listeners;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.listeners != 'undefined') {
				pyjs__exception_func_multiple_values('pyjamas.ui.KeyboardListener.fireKeyboardEvent', 'listeners');
			}
			if (typeof sender == 'undefined') {
				sender=__kwargs.sender;
				delete __kwargs.sender;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.sender != 'undefined') {
				pyjs__exception_func_multiple_values('pyjamas.ui.KeyboardListener.fireKeyboardEvent', 'sender');
			}
			if (typeof event == 'undefined') {
				event=__kwargs.event;
				delete __kwargs.event;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.event != 'undefined') {
				pyjs__exception_func_multiple_values('pyjamas.ui.KeyboardListener.fireKeyboardEvent', 'event');
			}
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('pyjamas.ui.KeyboardListener.fireKeyboardEvent', i);
				}
			}
			var __r = [listeners, sender, event];
			for (var pyjs__va_arg = 4;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		};

	} catch (pyjs_attr_err) {throw pyjslib._errorMapping(pyjs_attr_err)};
return this;
}; /* end pyjamas.ui.KeyboardListener */ 




pyjamas.ui.KeyboardListener_loaded_fn = function() {
}

pyjamas.ui.KeyboardListener_prepare_mod = function() {
    if ((typeof (module_load_request['pyjamas.ui.KeyboardListener']) == 'undefined') ||
        (module_load_request['pyjamas.ui.KeyboardListener'] < 2)) {
        module_load_request['pyjamas.ui.KeyboardListener'] = 2;
    }
    var modnames = new pyjslib.List([
		new pyjslib.List([
			'pyjamas']),
		new pyjslib.List([
			'pyjamas.DOM',
			'pyjamas.ui']),
		new pyjslib.List([
			])
	]);
    sys.overrides.update(new pyjslib.Dict({
		'mozilla.pyjslib': 'mozilla.pyjslib',
		'mozilla.pyjamas.DOM': 'mozilla.pyjamas.DOM'
	}));
    path = sys.loadpath;
    /*
    pyjslib.preload_app_modules(path, modnames, pyjamas.ui.KeyboardListener_loaded_fn,
                                            0,
                                            null);
                                            //'pyjamas.ui.KeyboardListener');
                                            */
    //alert("module ajax loaded fn called pyjamas.ui.KeyboardListener");

    if (sys.appname != 'pyjamas.ui.KeyboardListener')
    {
        if (module_load_request['pyjamas.ui.KeyboardListener'] < 3) {
            module_load_request['pyjamas.ui.KeyboardListener'] = 3;
        }
    }
}

//alert("module ajax loaded pyjamas.ui.KeyboardListener");

pyjamas.ui.KeyboardListener_prepare_mod();


// pyjamas.ui.Focus

// module libs (usually imported javascript)



// module code

pyjamas.ui.Focus = function (__mod_name__) {
	if(pyjamas.ui.Focus.__was_initialized__) return;
	pyjamas.ui.Focus.__was_initialized__ = true;
	if (__mod_name__ == null) __mod_name__ = 'pyjamas.ui.Focus';
	var __name__ = pyjamas.ui.Focus.__name__ = __mod_name__;
	pyjamas.ui.Focus.__track_lines__ = new Array();
	var Focus = pyjamas.ui.Focus;

		pyjamas.ui.Focus.__track_lines__[32] = "pyjamas.ui.Focus.py, line 30:\n    JS(\"\"\" ... \"\"\")";
		pyjamas.ui.Focus.__track_lines__[1] = "pyjamas.ui.Focus.py, line 1:\n    # Copyright 2006 James Tauber and contributors";
		pyjamas.ui.Focus.__track_lines__[34] = "pyjamas.ui.Focus.py, line 34:\n    def getTabIndex(elem):";
		pyjamas.ui.Focus.__track_lines__[37] = "pyjamas.ui.Focus.py, line 35:\n    JS(\"\"\" ... \"\"\")";
		pyjamas.ui.Focus.__track_lines__[39] = "pyjamas.ui.Focus.py, line 39:\n    def setAccessKey(elem, key):";
		pyjamas.ui.Focus.__track_lines__[47] = "pyjamas.ui.Focus.py, line 45:\n    JS(\"\"\" ... \"\"\")";
		pyjamas.ui.Focus.__track_lines__[42] = "pyjamas.ui.Focus.py, line 40:\n    JS(\"\"\" ... \"\"\")";
		pyjamas.ui.Focus.__track_lines__[44] = "pyjamas.ui.Focus.py, line 44:\n    def setTabIndex(elem, index):";
		pyjamas.ui.Focus.__track_lines__[14] = "pyjamas.ui.Focus.py, line 14:\n    from __pyjamas__ import JS";
		pyjamas.ui.Focus.__track_lines__[15] = "pyjamas.ui.Focus.py, line 15:\n    from pyjamas import DOM";
		pyjamas.ui.Focus.__track_lines__[17] = "pyjamas.ui.Focus.py, line 17:\n    def blur(elem):";
		pyjamas.ui.Focus.__track_lines__[20] = "pyjamas.ui.Focus.py, line 18:\n    JS(\"\"\" ... \"\"\")";
		pyjamas.ui.Focus.__track_lines__[22] = "pyjamas.ui.Focus.py, line 22:\n    def createFocusable():";
		pyjamas.ui.Focus.__track_lines__[27] = "pyjamas.ui.Focus.py, line 23:\n    JS(\"\"\" ... \"\"\")";
		pyjamas.ui.Focus.__track_lines__[29] = "pyjamas.ui.Focus.py, line 29:\n    def focus(elem):";
	try {
		track.module='pyjamas.ui.Focus';
		track.lineno=1;
		track.lineno=14;
		track.lineno=15;
		modules['pyjamas'] = pyjamas();
		pyjslib.import_module(sys.loadpath, 'pyjamas.ui.Focus', 'pyjamas', 0, false);
		track.module='pyjamas.ui.Focus';

		modules['pyjamas'] = pyjamas();
		pyjslib.import_module(sys.loadpath, 'pyjamas.ui.Focus', 'pyjamas', 0, false);
		track.module='pyjamas.ui.Focus';

		modules['pyjamas.DOM'] = pyjamas.DOM();
		pyjslib.import_module(sys.loadpath, 'pyjamas.ui.Focus', 'pyjamas.DOM', 0, false);
		track.module='pyjamas.ui.Focus';

		pyjamas.ui.Focus.DOM = pyjamas.DOM;
		track.lineno=17;
		pyjamas.ui.Focus.blur = function(elem) {
			if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length);
			track={module:'pyjamas.ui.Focus',lineno:17};trackstack.push(track);
			track.module='pyjamas.ui.Focus';
			track.lineno=17;
			track.lineno=20;

    elem.blur();
    
			trackstack.pop();track=trackstack.pop();trackstack.push(track);
		};
		pyjamas.ui.Focus.blur.__name__ = 'blur';

		pyjamas.ui.Focus.blur.parse_kwargs = function ( __kwargs, elem ) {
			if (typeof elem == 'undefined') {
				elem=__kwargs.elem;
				delete __kwargs.elem;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.elem != 'undefined') {
				pyjs__exception_func_multiple_values('pyjamas.ui.Focus.blur', 'elem');
			}
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('pyjamas.ui.Focus.blur', i);
				}
			}
			var __r = [elem];
			for (var pyjs__va_arg = 2;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		};
		track.lineno=22;
		pyjamas.ui.Focus.createFocusable = function() {
			if (pyjs_options.arg_count && arguments.length != 0) pyjs__exception_func_param(arguments.callee.__name__, 0, 0, arguments.length);

    var e = $doc.createElement("DIV");
    e.tabIndex = 0;
    return e;
    
		};
		pyjamas.ui.Focus.createFocusable.__name__ = 'createFocusable';

		pyjamas.ui.Focus.createFocusable.parse_kwargs = function ( __kwargs ) {
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('pyjamas.ui.Focus.createFocusable', i);
				}
			}
			var __r = [];
			for (var pyjs__va_arg = 1;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		};
		track.lineno=29;
		pyjamas.ui.Focus.focus = function(elem) {
			if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length);
			track={module:'pyjamas.ui.Focus',lineno:29};trackstack.push(track);
			track.module='pyjamas.ui.Focus';
			track.lineno=29;
			track.lineno=32;

    elem.focus();
    
			trackstack.pop();track=trackstack.pop();trackstack.push(track);
		};
		pyjamas.ui.Focus.focus.__name__ = 'focus';

		pyjamas.ui.Focus.focus.parse_kwargs = function ( __kwargs, elem ) {
			if (typeof elem == 'undefined') {
				elem=__kwargs.elem;
				delete __kwargs.elem;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.elem != 'undefined') {
				pyjs__exception_func_multiple_values('pyjamas.ui.Focus.focus', 'elem');
			}
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('pyjamas.ui.Focus.focus', i);
				}
			}
			var __r = [elem];
			for (var pyjs__va_arg = 2;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		};
		track.lineno=34;
		pyjamas.ui.Focus.getTabIndex = function(elem) {
			if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length);

    return elem.tabIndex;
    
		};
		pyjamas.ui.Focus.getTabIndex.__name__ = 'getTabIndex';

		pyjamas.ui.Focus.getTabIndex.parse_kwargs = function ( __kwargs, elem ) {
			if (typeof elem == 'undefined') {
				elem=__kwargs.elem;
				delete __kwargs.elem;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.elem != 'undefined') {
				pyjs__exception_func_multiple_values('pyjamas.ui.Focus.getTabIndex', 'elem');
			}
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('pyjamas.ui.Focus.getTabIndex', i);
				}
			}
			var __r = [elem];
			for (var pyjs__va_arg = 2;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		};
		track.lineno=39;
		pyjamas.ui.Focus.setAccessKey = function(elem, key) {
			if (pyjs_options.arg_count && arguments.length != 2) pyjs__exception_func_param(arguments.callee.__name__, 2, 2, arguments.length);
			track={module:'pyjamas.ui.Focus',lineno:39};trackstack.push(track);
			track.module='pyjamas.ui.Focus';
			track.lineno=39;
			track.lineno=42;

    elem.accessKey = key;
    
			trackstack.pop();track=trackstack.pop();trackstack.push(track);
		};
		pyjamas.ui.Focus.setAccessKey.__name__ = 'setAccessKey';

		pyjamas.ui.Focus.setAccessKey.parse_kwargs = function ( __kwargs, elem, key ) {
			if (typeof elem == 'undefined') {
				elem=__kwargs.elem;
				delete __kwargs.elem;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.elem != 'undefined') {
				pyjs__exception_func_multiple_values('pyjamas.ui.Focus.setAccessKey', 'elem');
			}
			if (typeof key == 'undefined') {
				key=__kwargs.key;
				delete __kwargs.key;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.key != 'undefined') {
				pyjs__exception_func_multiple_values('pyjamas.ui.Focus.setAccessKey', 'key');
			}
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('pyjamas.ui.Focus.setAccessKey', i);
				}
			}
			var __r = [elem, key];
			for (var pyjs__va_arg = 3;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		};
		track.lineno=44;
		pyjamas.ui.Focus.setTabIndex = function(elem, index) {
			if (pyjs_options.arg_count && arguments.length != 2) pyjs__exception_func_param(arguments.callee.__name__, 2, 2, arguments.length);
			track={module:'pyjamas.ui.Focus',lineno:44};trackstack.push(track);
			track.module='pyjamas.ui.Focus';
			track.lineno=44;
			track.lineno=47;

    elem.tabIndex = index;
    
			trackstack.pop();track=trackstack.pop();trackstack.push(track);
		};
		pyjamas.ui.Focus.setTabIndex.__name__ = 'setTabIndex';

		pyjamas.ui.Focus.setTabIndex.parse_kwargs = function ( __kwargs, elem, index ) {
			if (typeof elem == 'undefined') {
				elem=__kwargs.elem;
				delete __kwargs.elem;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.elem != 'undefined') {
				pyjs__exception_func_multiple_values('pyjamas.ui.Focus.setTabIndex', 'elem');
			}
			if (typeof index == 'undefined') {
				index=__kwargs.index;
				delete __kwargs.index;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.index != 'undefined') {
				pyjs__exception_func_multiple_values('pyjamas.ui.Focus.setTabIndex', 'index');
			}
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('pyjamas.ui.Focus.setTabIndex', i);
				}
			}
			var __r = [elem, index];
			for (var pyjs__va_arg = 3;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		};

	} catch (pyjs_attr_err) {throw pyjslib._errorMapping(pyjs_attr_err)};
return this;
}; /* end pyjamas.ui.Focus */ 




pyjamas.ui.Focus_loaded_fn = function() {
}

pyjamas.ui.Focus_prepare_mod = function() {
    if ((typeof (module_load_request['pyjamas.ui.Focus']) == 'undefined') ||
        (module_load_request['pyjamas.ui.Focus'] < 2)) {
        module_load_request['pyjamas.ui.Focus'] = 2;
    }
    var modnames = new pyjslib.List([
		new pyjslib.List([
			'pyjamas']),
		new pyjslib.List([
			'pyjamas.DOM',
			'pyjamas.ui']),
		new pyjslib.List([
			])
	]);
    sys.overrides.update(new pyjslib.Dict({
		'mozilla.pyjslib': 'mozilla.pyjslib',
		'mozilla.pyjamas.DOM': 'mozilla.pyjamas.DOM'
	}));
    path = sys.loadpath;
    /*
    pyjslib.preload_app_modules(path, modnames, pyjamas.ui.Focus_loaded_fn,
                                            0,
                                            null);
                                            //'pyjamas.ui.Focus');
                                            */
    //alert("module ajax loaded fn called pyjamas.ui.Focus");

    if (sys.appname != 'pyjamas.ui.Focus')
    {
        if (module_load_request['pyjamas.ui.Focus'] < 3) {
            module_load_request['pyjamas.ui.Focus'] = 3;
        }
    }
}

//alert("module ajax loaded pyjamas.ui.Focus");

pyjamas.ui.Focus_prepare_mod();


// pyjamas.ui.FocusListener

// module libs (usually imported javascript)



// module code

pyjamas.ui.FocusListener = function (__mod_name__) {
	if(pyjamas.ui.FocusListener.__was_initialized__) return;
	pyjamas.ui.FocusListener.__was_initialized__ = true;
	if (__mod_name__ == null) __mod_name__ = 'pyjamas.ui.FocusListener';
	var __name__ = pyjamas.ui.FocusListener.__name__ = __mod_name__;
	pyjamas.ui.FocusListener.__track_lines__ = new Array();
	var FocusListener = pyjamas.ui.FocusListener;

		pyjamas.ui.FocusListener.__track_lines__[1] = "pyjamas.ui.FocusListener.py, line 1:\n    # Copyright 2006 James Tauber and contributors";
		pyjamas.ui.FocusListener.__track_lines__[14] = "pyjamas.ui.FocusListener.py, line 14:\n    from pyjamas import DOM";
		pyjamas.ui.FocusListener.__track_lines__[16] = "pyjamas.ui.FocusListener.py, line 16:\n    def fireFocusEvent(listeners, sender, event):";
		pyjamas.ui.FocusListener.__track_lines__[17] = "pyjamas.ui.FocusListener.py, line 17:\n    type = DOM.eventGetType(event)";
		pyjamas.ui.FocusListener.__track_lines__[18] = "pyjamas.ui.FocusListener.py, line 18:\n    if type == \"focus\":";
		pyjamas.ui.FocusListener.__track_lines__[19] = "pyjamas.ui.FocusListener.py, line 19:\n    for listener in listeners:";
		pyjamas.ui.FocusListener.__track_lines__[20] = "pyjamas.ui.FocusListener.py, line 20:\n    listener.onFocus(sender)";
		pyjamas.ui.FocusListener.__track_lines__[22] = "pyjamas.ui.FocusListener.py, line 22:\n    for listener in listeners:";
		pyjamas.ui.FocusListener.__track_lines__[23] = "pyjamas.ui.FocusListener.py, line 23:\n    listener.onLostFocus(sender)";
	try {
		track.module='pyjamas.ui.FocusListener';
		track.lineno=1;
		track.lineno=14;
		modules['pyjamas'] = pyjamas();
		pyjslib.import_module(sys.loadpath, 'pyjamas.ui.FocusListener', 'pyjamas', 0, false);
		track.module='pyjamas.ui.FocusListener';

		modules['pyjamas'] = pyjamas();
		pyjslib.import_module(sys.loadpath, 'pyjamas.ui.FocusListener', 'pyjamas', 0, false);
		track.module='pyjamas.ui.FocusListener';

		modules['pyjamas.DOM'] = pyjamas.DOM();
		pyjslib.import_module(sys.loadpath, 'pyjamas.ui.FocusListener', 'pyjamas.DOM', 0, false);
		track.module='pyjamas.ui.FocusListener';

		pyjamas.ui.FocusListener.DOM = pyjamas.DOM;
		track.lineno=16;
		pyjamas.ui.FocusListener.fireFocusEvent = function(listeners, sender, event) {
			if (pyjs_options.arg_count && arguments.length != 3) pyjs__exception_func_param(arguments.callee.__name__, 3, 3, arguments.length);
			track={module:'pyjamas.ui.FocusListener',lineno:16};trackstack.push(track);
			track.module='pyjamas.ui.FocusListener';
			track.lineno=16;
			track.lineno=17;
			var type = pyjamas.ui.FocusListener.DOM.eventGetType(event);
			track.lineno=18;
			if (pyjslib.bool(pyjslib.eq(type, String('focus')))) {
				track.lineno=19;
				var pyjs__trackstack_size_1=trackstack.length;
				var __listener = listeners.__iter__();
				try {
					while (true) {
						var listener = __listener.next();
						
						track.lineno=20;
						listener.onFocus(sender);
					}
				} catch (e) {
					if (e.__name__ != 'StopIteration') {
						throw e;
					}
				}
				if (trackstack.length > pyjs__trackstack_size_1) {
					trackstack = trackstack.slice(0,pyjs__trackstack_size_1);
					track = trackstack.slice(-1)[0];
				}
				track.module='pyjamas.ui.FocusListener';
			}
			else if (pyjslib.bool(pyjslib.eq(type, String('blur')))) {
				track.lineno=22;
				var pyjs__trackstack_size_1=trackstack.length;
				var __listener = listeners.__iter__();
				try {
					while (true) {
						var listener = __listener.next();
						
						track.lineno=23;
						listener.onLostFocus(sender);
					}
				} catch (e) {
					if (e.__name__ != 'StopIteration') {
						throw e;
					}
				}
				if (trackstack.length > pyjs__trackstack_size_1) {
					trackstack = trackstack.slice(0,pyjs__trackstack_size_1);
					track = trackstack.slice(-1)[0];
				}
				track.module='pyjamas.ui.FocusListener';
			}
			trackstack.pop();track=trackstack.pop();trackstack.push(track);
			return null;
		};
		pyjamas.ui.FocusListener.fireFocusEvent.__name__ = 'fireFocusEvent';

		pyjamas.ui.FocusListener.fireFocusEvent.parse_kwargs = function ( __kwargs, listeners, sender, event ) {
			if (typeof listeners == 'undefined') {
				listeners=__kwargs.listeners;
				delete __kwargs.listeners;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.listeners != 'undefined') {
				pyjs__exception_func_multiple_values('pyjamas.ui.FocusListener.fireFocusEvent', 'listeners');
			}
			if (typeof sender == 'undefined') {
				sender=__kwargs.sender;
				delete __kwargs.sender;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.sender != 'undefined') {
				pyjs__exception_func_multiple_values('pyjamas.ui.FocusListener.fireFocusEvent', 'sender');
			}
			if (typeof event == 'undefined') {
				event=__kwargs.event;
				delete __kwargs.event;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.event != 'undefined') {
				pyjs__exception_func_multiple_values('pyjamas.ui.FocusListener.fireFocusEvent', 'event');
			}
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('pyjamas.ui.FocusListener.fireFocusEvent', i);
				}
			}
			var __r = [listeners, sender, event];
			for (var pyjs__va_arg = 4;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		};

	} catch (pyjs_attr_err) {throw pyjslib._errorMapping(pyjs_attr_err)};
return this;
}; /* end pyjamas.ui.FocusListener */ 




pyjamas.ui.FocusListener_loaded_fn = function() {
}

pyjamas.ui.FocusListener_prepare_mod = function() {
    if ((typeof (module_load_request['pyjamas.ui.FocusListener']) == 'undefined') ||
        (module_load_request['pyjamas.ui.FocusListener'] < 2)) {
        module_load_request['pyjamas.ui.FocusListener'] = 2;
    }
    var modnames = new pyjslib.List([
		new pyjslib.List([
			'pyjamas']),
		new pyjslib.List([
			'pyjamas.DOM',
			'pyjamas.ui']),
		new pyjslib.List([
			])
	]);
    sys.overrides.update(new pyjslib.Dict({
		'mozilla.pyjslib': 'mozilla.pyjslib',
		'mozilla.pyjamas.DOM': 'mozilla.pyjamas.DOM'
	}));
    path = sys.loadpath;
    /*
    pyjslib.preload_app_modules(path, modnames, pyjamas.ui.FocusListener_loaded_fn,
                                            0,
                                            null);
                                            //'pyjamas.ui.FocusListener');
                                            */
    //alert("module ajax loaded fn called pyjamas.ui.FocusListener");

    if (sys.appname != 'pyjamas.ui.FocusListener')
    {
        if (module_load_request['pyjamas.ui.FocusListener'] < 3) {
            module_load_request['pyjamas.ui.FocusListener'] = 3;
        }
    }
}

//alert("module ajax loaded pyjamas.ui.FocusListener");

pyjamas.ui.FocusListener_prepare_mod();


// pyjamas.ui.MouseListener

// module libs (usually imported javascript)



// module code

pyjamas.ui.MouseListener = function (__mod_name__) {
	if(pyjamas.ui.MouseListener.__was_initialized__) return;
	pyjamas.ui.MouseListener.__was_initialized__ = true;
	if (__mod_name__ == null) __mod_name__ = 'pyjamas.ui.MouseListener';
	var __name__ = pyjamas.ui.MouseListener.__name__ = __mod_name__;
	pyjamas.ui.MouseListener.__track_lines__ = new Array();
	var MouseListener = pyjamas.ui.MouseListener;

		pyjamas.ui.MouseListener.__track_lines__[32] = "pyjamas.ui.MouseListener.py, line 32:\n    if not DOM.isOrHasChild(sender.getElement(), from_element):";
		pyjamas.ui.MouseListener.__track_lines__[1] = "pyjamas.ui.MouseListener.py, line 1:\n    # Copyright 2006 James Tauber and contributors";
		pyjamas.ui.MouseListener.__track_lines__[34] = "pyjamas.ui.MouseListener.py, line 34:\n    listener.onMouseEnter(sender)";
		pyjamas.ui.MouseListener.__track_lines__[36] = "pyjamas.ui.MouseListener.py, line 36:\n    to_element = DOM.eventGetToElement(event)";
		pyjamas.ui.MouseListener.__track_lines__[37] = "pyjamas.ui.MouseListener.py, line 37:\n    if not DOM.isOrHasChild(sender.getElement(), to_element):";
		pyjamas.ui.MouseListener.__track_lines__[38] = "pyjamas.ui.MouseListener.py, line 38:\n    for listener in listeners:";
		pyjamas.ui.MouseListener.__track_lines__[33] = "pyjamas.ui.MouseListener.py, line 33:\n    for listener in listeners:";
		pyjamas.ui.MouseListener.__track_lines__[39] = "pyjamas.ui.MouseListener.py, line 39:\n    listener.onMouseLeave(sender)";
		pyjamas.ui.MouseListener.__track_lines__[14] = "pyjamas.ui.MouseListener.py, line 14:\n    from pyjamas import DOM";
		pyjamas.ui.MouseListener.__track_lines__[16] = "pyjamas.ui.MouseListener.py, line 16:\n    def fireMouseEvent(listeners, sender, event):";
		pyjamas.ui.MouseListener.__track_lines__[17] = "pyjamas.ui.MouseListener.py, line 17:\n    x = DOM.eventGetClientX(event) - DOM.getAbsoluteLeft(sender.getElement())";
		pyjamas.ui.MouseListener.__track_lines__[18] = "pyjamas.ui.MouseListener.py, line 18:\n    y = DOM.eventGetClientY(event) - DOM.getAbsoluteTop(sender.getElement())";
		pyjamas.ui.MouseListener.__track_lines__[20] = "pyjamas.ui.MouseListener.py, line 20:\n    type = DOM.eventGetType(event)";
		pyjamas.ui.MouseListener.__track_lines__[21] = "pyjamas.ui.MouseListener.py, line 21:\n    if type == \"mousedown\":";
		pyjamas.ui.MouseListener.__track_lines__[22] = "pyjamas.ui.MouseListener.py, line 22:\n    for listener in listeners:";
		pyjamas.ui.MouseListener.__track_lines__[23] = "pyjamas.ui.MouseListener.py, line 23:\n    listener.onMouseDown(sender, x, y)";
		pyjamas.ui.MouseListener.__track_lines__[25] = "pyjamas.ui.MouseListener.py, line 25:\n    for listener in listeners:";
		pyjamas.ui.MouseListener.__track_lines__[26] = "pyjamas.ui.MouseListener.py, line 26:\n    listener.onMouseUp(sender, x, y)";
		pyjamas.ui.MouseListener.__track_lines__[28] = "pyjamas.ui.MouseListener.py, line 28:\n    for listener in listeners:";
		pyjamas.ui.MouseListener.__track_lines__[29] = "pyjamas.ui.MouseListener.py, line 29:\n    listener.onMouseMove(sender, x, y)";
		pyjamas.ui.MouseListener.__track_lines__[31] = "pyjamas.ui.MouseListener.py, line 31:\n    from_element = DOM.eventGetFromElement(event)";
	try {
		track.module='pyjamas.ui.MouseListener';
		track.lineno=1;
		track.lineno=14;
		modules['pyjamas'] = pyjamas();
		pyjslib.import_module(sys.loadpath, 'pyjamas.ui.MouseListener', 'pyjamas', 0, false);
		track.module='pyjamas.ui.MouseListener';

		modules['pyjamas'] = pyjamas();
		pyjslib.import_module(sys.loadpath, 'pyjamas.ui.MouseListener', 'pyjamas', 0, false);
		track.module='pyjamas.ui.MouseListener';

		modules['pyjamas.DOM'] = pyjamas.DOM();
		pyjslib.import_module(sys.loadpath, 'pyjamas.ui.MouseListener', 'pyjamas.DOM', 0, false);
		track.module='pyjamas.ui.MouseListener';

		pyjamas.ui.MouseListener.DOM = pyjamas.DOM;
		track.lineno=16;
		pyjamas.ui.MouseListener.fireMouseEvent = function(listeners, sender, event) {
			if (pyjs_options.arg_count && arguments.length != 3) pyjs__exception_func_param(arguments.callee.__name__, 3, 3, arguments.length);
			track={module:'pyjamas.ui.MouseListener',lineno:16};trackstack.push(track);
			track.module='pyjamas.ui.MouseListener';
			track.lineno=16;
			track.lineno=17;
			var x =  ( pyjamas.ui.MouseListener.DOM.eventGetClientX(event) - pyjamas.ui.MouseListener.DOM.getAbsoluteLeft(sender.getElement()) ) ;
			track.lineno=18;
			var y =  ( pyjamas.ui.MouseListener.DOM.eventGetClientY(event) - pyjamas.ui.MouseListener.DOM.getAbsoluteTop(sender.getElement()) ) ;
			track.lineno=20;
			var type = pyjamas.ui.MouseListener.DOM.eventGetType(event);
			track.lineno=21;
			if (pyjslib.bool(pyjslib.eq(type, String('mousedown')))) {
				track.lineno=22;
				var pyjs__trackstack_size_1=trackstack.length;
				var __listener = listeners.__iter__();
				try {
					while (true) {
						var listener = __listener.next();
						
						track.lineno=23;
						listener.onMouseDown(sender, x, y);
					}
				} catch (e) {
					if (e.__name__ != 'StopIteration') {
						throw e;
					}
				}
				if (trackstack.length > pyjs__trackstack_size_1) {
					trackstack = trackstack.slice(0,pyjs__trackstack_size_1);
					track = trackstack.slice(-1)[0];
				}
				track.module='pyjamas.ui.MouseListener';
			}
			else if (pyjslib.bool(pyjslib.eq(type, String('mouseup')))) {
				track.lineno=25;
				var pyjs__trackstack_size_1=trackstack.length;
				var __listener = listeners.__iter__();
				try {
					while (true) {
						var listener = __listener.next();
						
						track.lineno=26;
						listener.onMouseUp(sender, x, y);
					}
				} catch (e) {
					if (e.__name__ != 'StopIteration') {
						throw e;
					}
				}
				if (trackstack.length > pyjs__trackstack_size_1) {
					trackstack = trackstack.slice(0,pyjs__trackstack_size_1);
					track = trackstack.slice(-1)[0];
				}
				track.module='pyjamas.ui.MouseListener';
			}
			else if (pyjslib.bool(pyjslib.eq(type, String('mousemove')))) {
				track.lineno=28;
				var pyjs__trackstack_size_1=trackstack.length;
				var __listener = listeners.__iter__();
				try {
					while (true) {
						var listener = __listener.next();
						
						track.lineno=29;
						listener.onMouseMove(sender, x, y);
					}
				} catch (e) {
					if (e.__name__ != 'StopIteration') {
						throw e;
					}
				}
				if (trackstack.length > pyjs__trackstack_size_1) {
					trackstack = trackstack.slice(0,pyjs__trackstack_size_1);
					track = trackstack.slice(-1)[0];
				}
				track.module='pyjamas.ui.MouseListener';
			}
			else if (pyjslib.bool(pyjslib.eq(type, String('mouseover')))) {
				track.lineno=31;
				var from_element = pyjamas.ui.MouseListener.DOM.eventGetFromElement(event);
				track.lineno=32;
				if (pyjslib.bool(!(pyjamas.ui.MouseListener.DOM.isOrHasChild(sender.getElement(), from_element)))) {
					track.lineno=33;
					var pyjs__trackstack_size_1=trackstack.length;
					var __listener = listeners.__iter__();
					try {
						while (true) {
							var listener = __listener.next();
							
							track.lineno=34;
							listener.onMouseEnter(sender);
						}
					} catch (e) {
						if (e.__name__ != 'StopIteration') {
							throw e;
						}
					}
					if (trackstack.length > pyjs__trackstack_size_1) {
						trackstack = trackstack.slice(0,pyjs__trackstack_size_1);
						track = trackstack.slice(-1)[0];
					}
					track.module='pyjamas.ui.MouseListener';
				}
			}
			else if (pyjslib.bool(pyjslib.eq(type, String('mouseout')))) {
				track.lineno=36;
				var to_element = pyjamas.ui.MouseListener.DOM.eventGetToElement(event);
				track.lineno=37;
				if (pyjslib.bool(!(pyjamas.ui.MouseListener.DOM.isOrHasChild(sender.getElement(), to_element)))) {
					track.lineno=38;
					var pyjs__trackstack_size_1=trackstack.length;
					var __listener = listeners.__iter__();
					try {
						while (true) {
							var listener = __listener.next();
							
							track.lineno=39;
							listener.onMouseLeave(sender);
						}
					} catch (e) {
						if (e.__name__ != 'StopIteration') {
							throw e;
						}
					}
					if (trackstack.length > pyjs__trackstack_size_1) {
						trackstack = trackstack.slice(0,pyjs__trackstack_size_1);
						track = trackstack.slice(-1)[0];
					}
					track.module='pyjamas.ui.MouseListener';
				}
			}
			trackstack.pop();track=trackstack.pop();trackstack.push(track);
			return null;
		};
		pyjamas.ui.MouseListener.fireMouseEvent.__name__ = 'fireMouseEvent';

		pyjamas.ui.MouseListener.fireMouseEvent.parse_kwargs = function ( __kwargs, listeners, sender, event ) {
			if (typeof listeners == 'undefined') {
				listeners=__kwargs.listeners;
				delete __kwargs.listeners;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.listeners != 'undefined') {
				pyjs__exception_func_multiple_values('pyjamas.ui.MouseListener.fireMouseEvent', 'listeners');
			}
			if (typeof sender == 'undefined') {
				sender=__kwargs.sender;
				delete __kwargs.sender;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.sender != 'undefined') {
				pyjs__exception_func_multiple_values('pyjamas.ui.MouseListener.fireMouseEvent', 'sender');
			}
			if (typeof event == 'undefined') {
				event=__kwargs.event;
				delete __kwargs.event;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.event != 'undefined') {
				pyjs__exception_func_multiple_values('pyjamas.ui.MouseListener.fireMouseEvent', 'event');
			}
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('pyjamas.ui.MouseListener.fireMouseEvent', i);
				}
			}
			var __r = [listeners, sender, event];
			for (var pyjs__va_arg = 4;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		};

	} catch (pyjs_attr_err) {throw pyjslib._errorMapping(pyjs_attr_err)};
return this;
}; /* end pyjamas.ui.MouseListener */ 




pyjamas.ui.MouseListener_loaded_fn = function() {
}

pyjamas.ui.MouseListener_prepare_mod = function() {
    if ((typeof (module_load_request['pyjamas.ui.MouseListener']) == 'undefined') ||
        (module_load_request['pyjamas.ui.MouseListener'] < 2)) {
        module_load_request['pyjamas.ui.MouseListener'] = 2;
    }
    var modnames = new pyjslib.List([
		new pyjslib.List([
			'pyjamas']),
		new pyjslib.List([
			'pyjamas.DOM',
			'pyjamas.ui']),
		new pyjslib.List([
			])
	]);
    sys.overrides.update(new pyjslib.Dict({
		'mozilla.pyjslib': 'mozilla.pyjslib',
		'mozilla.pyjamas.DOM': 'mozilla.pyjamas.DOM'
	}));
    path = sys.loadpath;
    /*
    pyjslib.preload_app_modules(path, modnames, pyjamas.ui.MouseListener_loaded_fn,
                                            0,
                                            null);
                                            //'pyjamas.ui.MouseListener');
                                            */
    //alert("module ajax loaded fn called pyjamas.ui.MouseListener");

    if (sys.appname != 'pyjamas.ui.MouseListener')
    {
        if (module_load_request['pyjamas.ui.MouseListener'] < 3) {
            module_load_request['pyjamas.ui.MouseListener'] = 3;
        }
    }
}

//alert("module ajax loaded pyjamas.ui.MouseListener");

pyjamas.ui.MouseListener_prepare_mod();


// pyjamas.log

// module libs (usually imported javascript)



// module code

pyjamas.log = function (__mod_name__) {
	if(pyjamas.log.__was_initialized__) return;
	pyjamas.log.__was_initialized__ = true;
	if (__mod_name__ == null) __mod_name__ = 'pyjamas.log';
	var __name__ = pyjamas.log.__name__ = __mod_name__;
	pyjamas.log.__track_lines__ = new Array();
	var log = pyjamas.log;

		pyjamas.log.__track_lines__[1] = "pyjamas.log.py, line 1:\n    # Use this to output (cumulatively) text at the bottom of the HTML page";
		pyjamas.log.__track_lines__[3] = "pyjamas.log.py, line 3:\n    from pyjamas import DOM";
		pyjamas.log.__track_lines__[5] = "pyjamas.log.py, line 5:\n    def getBodyElement():";
		pyjamas.log.__track_lines__[6] = "pyjamas.log.py, line 6:\n    JS(\" return $doc.body; \")";
		pyjamas.log.__track_lines__[8] = "pyjamas.log.py, line 8:\n    def write(text):";
		pyjamas.log.__track_lines__[9] = "pyjamas.log.py, line 9:\n    add_elem()";
		pyjamas.log.__track_lines__[10] = "pyjamas.log.py, line 10:\n    global data, element";
		pyjamas.log.__track_lines__[11] = "pyjamas.log.py, line 11:\n    text = text.replace(\"\\n\", \"<br />\\n\")";
		pyjamas.log.__track_lines__[12] = "pyjamas.log.py, line 12:\n    data += text";
		pyjamas.log.__track_lines__[13] = "pyjamas.log.py, line 13:\n    DOM.setInnerHTML(element, data)";
		pyjamas.log.__track_lines__[15] = "pyjamas.log.py, line 15:\n    def writebr(text):";
		pyjamas.log.__track_lines__[16] = "pyjamas.log.py, line 16:\n    write(text + \"\\n\")";
		pyjamas.log.__track_lines__[18] = "pyjamas.log.py, line 18:\n    data = \"\"";
		pyjamas.log.__track_lines__[19] = "pyjamas.log.py, line 19:\n    element = None";
		pyjamas.log.__track_lines__[21] = "pyjamas.log.py, line 21:\n    def add_elem():";
		pyjamas.log.__track_lines__[22] = "pyjamas.log.py, line 22:\n    global element";
		pyjamas.log.__track_lines__[23] = "pyjamas.log.py, line 23:\n    if element is not None:";
		pyjamas.log.__track_lines__[24] = "pyjamas.log.py, line 24:\n    return";
		pyjamas.log.__track_lines__[25] = "pyjamas.log.py, line 25:\n    element = DOM.createDiv()";
		pyjamas.log.__track_lines__[26] = "pyjamas.log.py, line 26:\n    DOM.appendChild(getBodyElement(), element)";
	try {
		track.module='pyjamas.log';
		track.lineno=1;
		track.lineno=3;
		modules['pyjamas'] = pyjamas();
		pyjslib.import_module(sys.loadpath, 'pyjamas.log', 'pyjamas', 0, false);
		track.module='pyjamas.log';

		modules['pyjamas'] = pyjamas();
		pyjslib.import_module(sys.loadpath, 'pyjamas.log', 'pyjamas', 0, false);
		track.module='pyjamas.log';

		modules['pyjamas.DOM'] = pyjamas.DOM();
		pyjslib.import_module(sys.loadpath, 'pyjamas.log', 'pyjamas.DOM', 0, false);
		track.module='pyjamas.log';

		pyjamas.log.DOM = pyjamas.DOM;
		track.lineno=5;
		pyjamas.log.getBodyElement = function() {
			if (pyjs_options.arg_count && arguments.length != 0) pyjs__exception_func_param(arguments.callee.__name__, 0, 0, arguments.length);
 return $doc.body; 
		};
		pyjamas.log.getBodyElement.__name__ = 'getBodyElement';

		pyjamas.log.getBodyElement.parse_kwargs = function ( __kwargs ) {
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('pyjamas.log.getBodyElement', i);
				}
			}
			var __r = [];
			for (var pyjs__va_arg = 1;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		};
		track.lineno=8;
		pyjamas.log.write = function(text) {
			if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length);
			track={module:'pyjamas.log',lineno:8};trackstack.push(track);
			track.module='pyjamas.log';
			track.lineno=8;
			track.lineno=9;
			pyjamas.log.add_elem();
			track.lineno=10;
			track.lineno=11;
			text = text.replace(String('\x0A'), String('\x3Cbr /\x3E\x0A'));
			track.lineno=12;
			pyjamas.log.data += text;
			track.lineno=13;
			pyjamas.log.DOM.setInnerHTML(pyjamas.log.element, pyjamas.log.data);
			trackstack.pop();track=trackstack.pop();trackstack.push(track);
			return null;
		};
		pyjamas.log.write.__name__ = 'write';

		pyjamas.log.write.parse_kwargs = function ( __kwargs, text ) {
			if (typeof text == 'undefined') {
				text=__kwargs.text;
				delete __kwargs.text;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.text != 'undefined') {
				pyjs__exception_func_multiple_values('pyjamas.log.write', 'text');
			}
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('pyjamas.log.write', i);
				}
			}
			var __r = [text];
			for (var pyjs__va_arg = 2;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		};
		track.lineno=15;
		pyjamas.log.writebr = function(text) {
			if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length);
			track={module:'pyjamas.log',lineno:15};trackstack.push(track);
			track.module='pyjamas.log';
			track.lineno=15;
			track.lineno=16;
			pyjamas.log.write( ( text + String('\x0A') ) );
			trackstack.pop();track=trackstack.pop();trackstack.push(track);
			return null;
		};
		pyjamas.log.writebr.__name__ = 'writebr';

		pyjamas.log.writebr.parse_kwargs = function ( __kwargs, text ) {
			if (typeof text == 'undefined') {
				text=__kwargs.text;
				delete __kwargs.text;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.text != 'undefined') {
				pyjs__exception_func_multiple_values('pyjamas.log.writebr', 'text');
			}
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('pyjamas.log.writebr', i);
				}
			}
			var __r = [text];
			for (var pyjs__va_arg = 2;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		};
		track.lineno=18;
		pyjamas.log.data = String('');
		track.lineno=19;
		pyjamas.log.element = null;
		track.lineno=21;
		pyjamas.log.add_elem = function() {
			if (pyjs_options.arg_count && arguments.length != 0) pyjs__exception_func_param(arguments.callee.__name__, 0, 0, arguments.length);
			track={module:'pyjamas.log',lineno:21};trackstack.push(track);
			track.module='pyjamas.log';
			track.lineno=21;
			track.lineno=22;
			track.lineno=23;
			if (pyjslib.bool((pyjamas.log.element !== null))) {
				track.lineno=24;
				track.lineno=24;
				var pyjs__ret = null;
				trackstack.pop();track=trackstack.pop();trackstack.push(track);
				return pyjs__ret;
			}
			track.lineno=25;
			pyjamas.log.element = pyjamas.log.DOM.createDiv();
			track.lineno=26;
			pyjamas.log.DOM.appendChild(pyjamas.log.getBodyElement(), pyjamas.log.element);
			trackstack.pop();track=trackstack.pop();trackstack.push(track);
			return null;
		};
		pyjamas.log.add_elem.__name__ = 'add_elem';

		pyjamas.log.add_elem.parse_kwargs = function ( __kwargs ) {
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('pyjamas.log.add_elem', i);
				}
			}
			var __r = [];
			for (var pyjs__va_arg = 1;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		};

	} catch (pyjs_attr_err) {throw pyjslib._errorMapping(pyjs_attr_err)};
return this;
}; /* end pyjamas.log */ 




pyjamas.log_loaded_fn = function() {
}

pyjamas.log_prepare_mod = function() {
    if ((typeof (module_load_request['pyjamas.log']) == 'undefined') ||
        (module_load_request['pyjamas.log'] < 2)) {
        module_load_request['pyjamas.log'] = 2;
    }
    var modnames = new pyjslib.List([
		new pyjslib.List([
			'pyjamas']),
		new pyjslib.List([
			'pyjamas.DOM']),
		new pyjslib.List([
			])
	]);
    sys.overrides.update(new pyjslib.Dict({
		'mozilla.pyjslib': 'mozilla.pyjslib',
		'mozilla.pyjamas.DOM': 'mozilla.pyjamas.DOM'
	}));
    path = sys.loadpath;
    /*
    pyjslib.preload_app_modules(path, modnames, pyjamas.log_loaded_fn,
                                            0,
                                            null);
                                            //'pyjamas.log');
                                            */
    //alert("module ajax loaded fn called pyjamas.log");

    if (sys.appname != 'pyjamas.log')
    {
        if (module_load_request['pyjamas.log'] < 3) {
            module_load_request['pyjamas.log'] = 3;
        }
    }
}

//alert("module ajax loaded pyjamas.log");

pyjamas.log_prepare_mod();


// pyjamas.ui.Event

// module libs (usually imported javascript)



// module code

pyjamas.ui.Event = function (__mod_name__) {
	if(pyjamas.ui.Event.__was_initialized__) return;
	pyjamas.ui.Event.__was_initialized__ = true;
	if (__mod_name__ == null) __mod_name__ = 'pyjamas.ui.Event';
	var __name__ = pyjamas.ui.Event.__name__ = __mod_name__;
	pyjamas.ui.Event.__track_lines__ = new Array();
	var Event = pyjamas.ui.Event;

		pyjamas.ui.Event.__track_lines__[1] = "pyjamas.ui.Event.py, line 1:\n    # Copyright 2006 James Tauber and contributors";
		pyjamas.ui.Event.__track_lines__[19] = "pyjamas.ui.Event.py, line 19:\n    BUTTON_LEFT   = 1";
		pyjamas.ui.Event.__track_lines__[20] = "pyjamas.ui.Event.py, line 20:\n    BUTTON_MIDDLE = 4";
		pyjamas.ui.Event.__track_lines__[21] = "pyjamas.ui.Event.py, line 21:\n    BUTTON_RIGHT  = 2";
		pyjamas.ui.Event.__track_lines__[23] = "pyjamas.ui.Event.py, line 23:\n    ONBLUR        = 0x01000";
		pyjamas.ui.Event.__track_lines__[24] = "pyjamas.ui.Event.py, line 24:\n    ONCHANGE      = 0x00400";
		pyjamas.ui.Event.__track_lines__[25] = "pyjamas.ui.Event.py, line 25:\n    ONCLICK       = 0x00001";
		pyjamas.ui.Event.__track_lines__[26] = "pyjamas.ui.Event.py, line 26:\n    ONCONTEXTMENU = 0x20000";
		pyjamas.ui.Event.__track_lines__[27] = "pyjamas.ui.Event.py, line 27:\n    ONDBLCLICK    = 0x00002";
		pyjamas.ui.Event.__track_lines__[28] = "pyjamas.ui.Event.py, line 28:\n    ONERROR       = 0x10000";
		pyjamas.ui.Event.__track_lines__[29] = "pyjamas.ui.Event.py, line 29:\n    ONFOCUS       = 0x00800";
		pyjamas.ui.Event.__track_lines__[30] = "pyjamas.ui.Event.py, line 30:\n    ONKEYDOWN     = 0x00080";
		pyjamas.ui.Event.__track_lines__[31] = "pyjamas.ui.Event.py, line 31:\n    ONKEYPRESS    = 0x00100";
		pyjamas.ui.Event.__track_lines__[32] = "pyjamas.ui.Event.py, line 32:\n    ONKEYUP       = 0x00200";
		pyjamas.ui.Event.__track_lines__[33] = "pyjamas.ui.Event.py, line 33:\n    ONLOAD        = 0x08000";
		pyjamas.ui.Event.__track_lines__[34] = "pyjamas.ui.Event.py, line 34:\n    ONLOSECAPTURE = 0x02000";
		pyjamas.ui.Event.__track_lines__[35] = "pyjamas.ui.Event.py, line 35:\n    ONMOUSEDOWN   = 0x00004";
		pyjamas.ui.Event.__track_lines__[36] = "pyjamas.ui.Event.py, line 36:\n    ONMOUSEMOVE   = 0x00040";
		pyjamas.ui.Event.__track_lines__[37] = "pyjamas.ui.Event.py, line 37:\n    ONMOUSEOUT    = 0x00020";
		pyjamas.ui.Event.__track_lines__[38] = "pyjamas.ui.Event.py, line 38:\n    ONMOUSEOVER   = 0x00010";
		pyjamas.ui.Event.__track_lines__[39] = "pyjamas.ui.Event.py, line 39:\n    ONMOUSEUP     = 0x00008";
		pyjamas.ui.Event.__track_lines__[40] = "pyjamas.ui.Event.py, line 40:\n    ONSCROLL      = 0x04000";
		pyjamas.ui.Event.__track_lines__[42] = "pyjamas.ui.Event.py, line 42:\n    FOCUSEVENTS   = 0x01800 # ONFOCUS | ONBLUR";
		pyjamas.ui.Event.__track_lines__[43] = "pyjamas.ui.Event.py, line 43:\n    KEYEVENTS     = 0x00380 # ONKEYDOWN | ONKEYPRESS | ONKEYUP";
		pyjamas.ui.Event.__track_lines__[44] = "pyjamas.ui.Event.py, line 44:\n    MOUSEEVENTS   = 0x0007C # ONMOUSEDOWN | ONMOUSEUP | ONMOUSEMOVE | ONMOUSEOVER | ONMOUSEOUT";
	try {
		track.module='pyjamas.ui.Event';
		track.lineno=1;
		track.lineno=19;
		pyjamas.ui.Event.BUTTON_LEFT = 1;
		track.lineno=20;
		pyjamas.ui.Event.BUTTON_MIDDLE = 4;
		track.lineno=21;
		pyjamas.ui.Event.BUTTON_RIGHT = 2;
		track.lineno=23;
		pyjamas.ui.Event.ONBLUR = 4096;
		track.lineno=24;
		pyjamas.ui.Event.ONCHANGE = 1024;
		track.lineno=25;
		pyjamas.ui.Event.ONCLICK = 1;
		track.lineno=26;
		pyjamas.ui.Event.ONCONTEXTMENU = 131072;
		track.lineno=27;
		pyjamas.ui.Event.ONDBLCLICK = 2;
		track.lineno=28;
		pyjamas.ui.Event.ONERROR = 65536;
		track.lineno=29;
		pyjamas.ui.Event.ONFOCUS = 2048;
		track.lineno=30;
		pyjamas.ui.Event.ONKEYDOWN = 128;
		track.lineno=31;
		pyjamas.ui.Event.ONKEYPRESS = 256;
		track.lineno=32;
		pyjamas.ui.Event.ONKEYUP = 512;
		track.lineno=33;
		pyjamas.ui.Event.ONLOAD = 32768;
		track.lineno=34;
		pyjamas.ui.Event.ONLOSECAPTURE = 8192;
		track.lineno=35;
		pyjamas.ui.Event.ONMOUSEDOWN = 4;
		track.lineno=36;
		pyjamas.ui.Event.ONMOUSEMOVE = 64;
		track.lineno=37;
		pyjamas.ui.Event.ONMOUSEOUT = 32;
		track.lineno=38;
		pyjamas.ui.Event.ONMOUSEOVER = 16;
		track.lineno=39;
		pyjamas.ui.Event.ONMOUSEUP = 8;
		track.lineno=40;
		pyjamas.ui.Event.ONSCROLL = 16384;
		track.lineno=42;
		pyjamas.ui.Event.FOCUSEVENTS = 6144;
		track.lineno=43;
		pyjamas.ui.Event.KEYEVENTS = 896;
		track.lineno=44;
		pyjamas.ui.Event.MOUSEEVENTS = 124;

	} catch (pyjs_attr_err) {throw pyjslib._errorMapping(pyjs_attr_err)};
return this;
}; /* end pyjamas.ui.Event */ 




pyjamas.ui.Event_loaded_fn = function() {
}

pyjamas.ui.Event_prepare_mod = function() {
    if ((typeof (module_load_request['pyjamas.ui.Event']) == 'undefined') ||
        (module_load_request['pyjamas.ui.Event'] < 2)) {
        module_load_request['pyjamas.ui.Event'] = 2;
    }
    var modnames = new pyjslib.List([
		new pyjslib.List([
			'pyjamas']),
		new pyjslib.List([
			'pyjamas.ui']),
		new pyjslib.List([
			])
	]);
    sys.overrides.update(new pyjslib.Dict({
		'mozilla.pyjslib': 'mozilla.pyjslib',
		'mozilla.pyjamas.DOM': 'mozilla.pyjamas.DOM'
	}));
    path = sys.loadpath;
    /*
    pyjslib.preload_app_modules(path, modnames, pyjamas.ui.Event_loaded_fn,
                                            0,
                                            null);
                                            //'pyjamas.ui.Event');
                                            */
    //alert("module ajax loaded fn called pyjamas.ui.Event");

    if (sys.appname != 'pyjamas.ui.Event')
    {
        if (module_load_request['pyjamas.ui.Event'] < 3) {
            module_load_request['pyjamas.ui.Event'] = 3;
        }
    }
}

//alert("module ajax loaded pyjamas.ui.Event");

pyjamas.ui.Event_prepare_mod();


// pyjamas.Window

// module libs (usually imported javascript)



// module code

pyjamas.Window = function (__mod_name__) {
	if(pyjamas.Window.__was_initialized__) return;
	pyjamas.Window.__was_initialized__ = true;
	if (__mod_name__ == null) __mod_name__ = 'pyjamas.Window';
	var __name__ = pyjamas.Window.__name__ = __mod_name__;
	pyjamas.Window.__track_lines__ = new Array();
	var Window = pyjamas.Window;

		pyjamas.Window.__track_lines__[1] = "pyjamas.Window.py, line 1:\n    from __pyjamas__ import JS";
		pyjamas.Window.__track_lines__[2] = "pyjamas.Window.py, line 2:\n    from pyjamas import Location";
		pyjamas.Window.__track_lines__[4] = "pyjamas.Window.py, line 4:\n    closingListeners = None";
		pyjamas.Window.__track_lines__[5] = "pyjamas.Window.py, line 5:\n    resizeListeners = None";
		pyjamas.Window.__track_lines__[7] = "pyjamas.Window.py, line 7:\n    def addWindowCloseListener(listener):";
		pyjamas.Window.__track_lines__[8] = "pyjamas.Window.py, line 8:\n    init_listeners()";
		pyjamas.Window.__track_lines__[9] = "pyjamas.Window.py, line 9:\n    global closingListeners";
		pyjamas.Window.__track_lines__[10] = "pyjamas.Window.py, line 10:\n    closingListeners.append(listener)";
		pyjamas.Window.__track_lines__[12] = "pyjamas.Window.py, line 12:\n    def addWindowResizeListener(listener):";
		pyjamas.Window.__track_lines__[13] = "pyjamas.Window.py, line 13:\n    init_listeners()";
		pyjamas.Window.__track_lines__[14] = "pyjamas.Window.py, line 14:\n    global resizeListeners";
		pyjamas.Window.__track_lines__[15] = "pyjamas.Window.py, line 15:\n    resizeListeners.append(listener)";
		pyjamas.Window.__track_lines__[17] = "pyjamas.Window.py, line 17:\n    def alert(msg):";
		pyjamas.Window.__track_lines__[20] = "pyjamas.Window.py, line 18:\n    JS(\"\"\" ... \"\"\")";
		pyjamas.Window.__track_lines__[22] = "pyjamas.Window.py, line 22:\n    def confirm(msg):";
		pyjamas.Window.__track_lines__[25] = "pyjamas.Window.py, line 23:\n    JS(\"\"\" ... \"\"\")";
		pyjamas.Window.__track_lines__[27] = "pyjamas.Window.py, line 27:\n    def prompt(msg, defaultReply=\"\"):";
		pyjamas.Window.__track_lines__[30] = "pyjamas.Window.py, line 28:\n    JS(\"\"\" ... \"\"\")";
		pyjamas.Window.__track_lines__[32] = "pyjamas.Window.py, line 32:\n    def enableScrolling(enable):";
		pyjamas.Window.__track_lines__[35] = "pyjamas.Window.py, line 33:\n    JS(\"\"\" ... \"\"\")";
		pyjamas.Window.__track_lines__[37] = "pyjamas.Window.py, line 37:\n    def scrollBy(x, y):";
		pyjamas.Window.__track_lines__[40] = "pyjamas.Window.py, line 38:\n    JS(\"\"\" ... \"\"\")";
		pyjamas.Window.__track_lines__[42] = "pyjamas.Window.py, line 42:\n    def scroll(x, y):";
		pyjamas.Window.__track_lines__[45] = "pyjamas.Window.py, line 43:\n    JS(\"\"\" ... \"\"\")";
		pyjamas.Window.__track_lines__[47] = "pyjamas.Window.py, line 47:\n    def getClientHeight():";
		pyjamas.Window.__track_lines__[52] = "pyjamas.Window.py, line 48:\n    JS(\"\"\" ... \"\"\")";
		pyjamas.Window.__track_lines__[54] = "pyjamas.Window.py, line 54:\n    def getClientWidth():";
		pyjamas.Window.__track_lines__[59] = "pyjamas.Window.py, line 55:\n    JS(\"\"\" ... \"\"\")";
		pyjamas.Window.__track_lines__[61] = "pyjamas.Window.py, line 61:\n    def setLocation(url):";
		pyjamas.Window.__track_lines__[64] = "pyjamas.Window.py, line 62:\n    JS(\"\"\" ... \"\"\")";
		pyjamas.Window.__track_lines__[66] = "pyjamas.Window.py, line 66:\n    location = None";
		pyjamas.Window.__track_lines__[68] = "pyjamas.Window.py, line 68:\n    def getLocation():";
		pyjamas.Window.__track_lines__[69] = "pyjamas.Window.py, line 69:\n    global location";
		pyjamas.Window.__track_lines__[70] = "pyjamas.Window.py, line 70:\n    wnd_location = None";
		pyjamas.Window.__track_lines__[71] = "pyjamas.Window.py, line 71:\n    if not location:";
		pyjamas.Window.__track_lines__[72] = "pyjamas.Window.py, line 72:\n    JS(\"\"\"wnd_location = $wnd.location;\"\"\")";
		pyjamas.Window.__track_lines__[73] = "pyjamas.Window.py, line 73:\n    location = Location.Location(wnd_location)";
		pyjamas.Window.__track_lines__[74] = "pyjamas.Window.py, line 74:\n    return location";
		pyjamas.Window.__track_lines__[77] = "pyjamas.Window.py, line 77:\n    def getTitle():";
		pyjamas.Window.__track_lines__[80] = "pyjamas.Window.py, line 78:\n    JS(\"\"\" ... \"\"\")";
		pyjamas.Window.__track_lines__[82] = "pyjamas.Window.py, line 82:\n    def open(url, name, features):";
		pyjamas.Window.__track_lines__[85] = "pyjamas.Window.py, line 83:\n    JS(\"\"\" ... \"\"\")";
		pyjamas.Window.__track_lines__[87] = "pyjamas.Window.py, line 87:\n    def removeWindowCloseListener(listener):";
		pyjamas.Window.__track_lines__[88] = "pyjamas.Window.py, line 88:\n    global closingListeners";
		pyjamas.Window.__track_lines__[89] = "pyjamas.Window.py, line 89:\n    closingListeners.remove(listener)";
		pyjamas.Window.__track_lines__[91] = "pyjamas.Window.py, line 91:\n    def removeWindowResizeListener(listener):";
		pyjamas.Window.__track_lines__[92] = "pyjamas.Window.py, line 92:\n    global resizeListeners";
		pyjamas.Window.__track_lines__[93] = "pyjamas.Window.py, line 93:\n    resizeListeners.remove(listener)";
		pyjamas.Window.__track_lines__[95] = "pyjamas.Window.py, line 95:\n    def setMargin(size):";
		pyjamas.Window.__track_lines__[98] = "pyjamas.Window.py, line 96:\n    JS(\"\"\" ... \"\"\")";
		pyjamas.Window.__track_lines__[100] = "pyjamas.Window.py, line 100:\n    def setTitle(title):";
		pyjamas.Window.__track_lines__[103] = "pyjamas.Window.py, line 101:\n    JS(\"\"\" ... \"\"\")";
		pyjamas.Window.__track_lines__[105] = "pyjamas.Window.py, line 105:\n    def setOnError(onError):";
		pyjamas.Window.__track_lines__[106] = "pyjamas.Window.py, line 106:\n    if (not callable(onError)):";
		pyjamas.Window.__track_lines__[107] = "pyjamas.Window.py, line 107:\n    raise TypeError(\"object is not callable\")";
		pyjamas.Window.__track_lines__[112] = "pyjamas.Window.py, line 108:\n    JS(\"\"\"\\ ... \"\"\")";
		pyjamas.Window.__track_lines__[114] = "pyjamas.Window.py, line 114:\n    def onError(msg, url, linenumber):";
		pyjamas.Window.__track_lines__[115] = "pyjamas.Window.py, line 115:\n    dialog=JS(\"\"\"$doc.createElement(\"div\")\"\"\")";
		pyjamas.Window.__track_lines__[116] = "pyjamas.Window.py, line 116:\n    dialog.className=\'errordialog\'";
		pyjamas.Window.__track_lines__[118] = "pyjamas.Window.py, line 118:\n    tracestr = sys.trackstackstr(trackstack.slice(0,-1))";
		pyjamas.Window.__track_lines__[119] = "pyjamas.Window.py, line 119:\n    tracestr = tracestr.replace(\"\\n\", \"<br />\\n&nbsp;&nbsp;&nbsp;\")";
		pyjamas.Window.__track_lines__[120] = "pyjamas.Window.py, line 120:\n    dialog.innerHTML=\'&nbsp;<b style=\"color:red\">JavaScript Error: </b>\' + \\";
		pyjamas.Window.__track_lines__[123] = "pyjamas.Window.py, line 123:\n    JS(\"\"\"$doc.body.appendChild(dialog)\"\"\")";
		pyjamas.Window.__track_lines__[124] = "pyjamas.Window.py, line 124:\n    return True";
		pyjamas.Window.__track_lines__[127] = "pyjamas.Window.py, line 127:\n    def onClosed():";
		pyjamas.Window.__track_lines__[128] = "pyjamas.Window.py, line 128:\n    fireClosedImpl()";
		pyjamas.Window.__track_lines__[131] = "pyjamas.Window.py, line 131:\n    def onClosing():";
		pyjamas.Window.__track_lines__[132] = "pyjamas.Window.py, line 132:\n    fireClosingImpl()";
		pyjamas.Window.__track_lines__[135] = "pyjamas.Window.py, line 135:\n    def onResize():";
		pyjamas.Window.__track_lines__[136] = "pyjamas.Window.py, line 136:\n    fireResizedImpl()";
		pyjamas.Window.__track_lines__[138] = "pyjamas.Window.py, line 138:\n    def fireClosedAndCatch(handler):";
		pyjamas.Window.__track_lines__[140] = "pyjamas.Window.py, line 140:\n    pass";
		pyjamas.Window.__track_lines__[142] = "pyjamas.Window.py, line 142:\n    def fireClosedImpl():";
		pyjamas.Window.__track_lines__[143] = "pyjamas.Window.py, line 143:\n    global closingListeners";
		pyjamas.Window.__track_lines__[145] = "pyjamas.Window.py, line 145:\n    for listener in closingListeners:";
		pyjamas.Window.__track_lines__[146] = "pyjamas.Window.py, line 146:\n    listener.onWindowClosed()";
		pyjamas.Window.__track_lines__[148] = "pyjamas.Window.py, line 148:\n    def fireClosingAndCatch(handler):";
		pyjamas.Window.__track_lines__[150] = "pyjamas.Window.py, line 150:\n    pass";
		pyjamas.Window.__track_lines__[152] = "pyjamas.Window.py, line 152:\n    def fireClosingImpl():";
		pyjamas.Window.__track_lines__[153] = "pyjamas.Window.py, line 153:\n    global closingListeners";
		pyjamas.Window.__track_lines__[155] = "pyjamas.Window.py, line 155:\n    ret = None";
		pyjamas.Window.__track_lines__[156] = "pyjamas.Window.py, line 156:\n    for listener in closingListeners:";
		pyjamas.Window.__track_lines__[157] = "pyjamas.Window.py, line 157:\n    msg = listener.onWindowClosing()";
		pyjamas.Window.__track_lines__[158] = "pyjamas.Window.py, line 158:\n    if ret == None:";
		pyjamas.Window.__track_lines__[159] = "pyjamas.Window.py, line 159:\n    ret = msg";
		pyjamas.Window.__track_lines__[160] = "pyjamas.Window.py, line 160:\n    return ret";
		pyjamas.Window.__track_lines__[162] = "pyjamas.Window.py, line 162:\n    def fireResizedAndCatch(handler):";
		pyjamas.Window.__track_lines__[164] = "pyjamas.Window.py, line 164:\n    pass";
		pyjamas.Window.__track_lines__[166] = "pyjamas.Window.py, line 166:\n    def fireResizedImpl():";
		pyjamas.Window.__track_lines__[167] = "pyjamas.Window.py, line 167:\n    global resizeListeners";
		pyjamas.Window.__track_lines__[169] = "pyjamas.Window.py, line 169:\n    for listener in resizeListeners:";
		pyjamas.Window.__track_lines__[170] = "pyjamas.Window.py, line 170:\n    listener.onWindowResized(getClientWidth(), getClientHeight())";
		pyjamas.Window.__track_lines__[172] = "pyjamas.Window.py, line 172:\n    def init_listeners():";
		pyjamas.Window.__track_lines__[173] = "pyjamas.Window.py, line 173:\n    global closingListeners";
		pyjamas.Window.__track_lines__[174] = "pyjamas.Window.py, line 174:\n    global resizeListeners";
		pyjamas.Window.__track_lines__[175] = "pyjamas.Window.py, line 175:\n    if not closingListeners:";
		pyjamas.Window.__track_lines__[176] = "pyjamas.Window.py, line 176:\n    closingListeners = []";
		pyjamas.Window.__track_lines__[177] = "pyjamas.Window.py, line 177:\n    if not resizeListeners:";
		pyjamas.Window.__track_lines__[178] = "pyjamas.Window.py, line 178:\n    resizeListeners = []";
		pyjamas.Window.__track_lines__[180] = "pyjamas.Window.py, line 180:\n    def init():";
		pyjamas.Window.__track_lines__[181] = "pyjamas.Window.py, line 181:\n    global onError";
		pyjamas.Window.__track_lines__[182] = "pyjamas.Window.py, line 182:\n    init_listeners()";
		pyjamas.Window.__track_lines__[201] = "pyjamas.Window.py, line 201:\n    \'\'\'";
		pyjamas.Window.__track_lines__[203] = "pyjamas.Window.py, line 203:\n    init()";
	try {
		track.module='pyjamas.Window';
		track.lineno=1;
		track.lineno=1;
		track.lineno=2;
		modules['pyjamas'] = pyjamas();
		pyjslib.import_module(sys.loadpath, 'pyjamas.Window', 'pyjamas', 0, false);
		track.module='pyjamas.Window';

		modules['pyjamas'] = pyjamas();
		pyjslib.import_module(sys.loadpath, 'pyjamas.Window', 'pyjamas', 0, false);
		track.module='pyjamas.Window';

		modules['pyjamas.Location'] = pyjamas.Location();
		pyjslib.import_module(sys.loadpath, 'pyjamas.Window', 'pyjamas.Location', 0, false);
		track.module='pyjamas.Window';

		pyjamas.Window.Location = pyjamas.Location;
		track.lineno=4;
		pyjamas.Window.closingListeners = null;
		track.lineno=5;
		pyjamas.Window.resizeListeners = null;
		track.lineno=7;
		pyjamas.Window.addWindowCloseListener = function(listener) {
			if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length);
			track={module:'pyjamas.Window',lineno:7};trackstack.push(track);
			track.module='pyjamas.Window';
			track.lineno=7;
			track.lineno=8;
			pyjamas.Window.init_listeners();
			track.lineno=9;
			track.lineno=10;
			pyjamas.Window.closingListeners.append(listener);
			trackstack.pop();track=trackstack.pop();trackstack.push(track);
			return null;
		};
		pyjamas.Window.addWindowCloseListener.__name__ = 'addWindowCloseListener';

		pyjamas.Window.addWindowCloseListener.parse_kwargs = function ( __kwargs, listener ) {
			if (typeof listener == 'undefined') {
				listener=__kwargs.listener;
				delete __kwargs.listener;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.listener != 'undefined') {
				pyjs__exception_func_multiple_values('pyjamas.Window.addWindowCloseListener', 'listener');
			}
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('pyjamas.Window.addWindowCloseListener', i);
				}
			}
			var __r = [listener];
			for (var pyjs__va_arg = 2;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		};
		track.lineno=12;
		pyjamas.Window.addWindowResizeListener = function(listener) {
			if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length);
			track={module:'pyjamas.Window',lineno:12};trackstack.push(track);
			track.module='pyjamas.Window';
			track.lineno=12;
			track.lineno=13;
			pyjamas.Window.init_listeners();
			track.lineno=14;
			track.lineno=15;
			pyjamas.Window.resizeListeners.append(listener);
			trackstack.pop();track=trackstack.pop();trackstack.push(track);
			return null;
		};
		pyjamas.Window.addWindowResizeListener.__name__ = 'addWindowResizeListener';

		pyjamas.Window.addWindowResizeListener.parse_kwargs = function ( __kwargs, listener ) {
			if (typeof listener == 'undefined') {
				listener=__kwargs.listener;
				delete __kwargs.listener;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.listener != 'undefined') {
				pyjs__exception_func_multiple_values('pyjamas.Window.addWindowResizeListener', 'listener');
			}
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('pyjamas.Window.addWindowResizeListener', i);
				}
			}
			var __r = [listener];
			for (var pyjs__va_arg = 2;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		};
		track.lineno=17;
		pyjamas.Window.alert = function(msg) {
			if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length);
			track={module:'pyjamas.Window',lineno:17};trackstack.push(track);
			track.module='pyjamas.Window';
			track.lineno=17;
			track.lineno=20;

    $wnd.alert(msg);
    
			trackstack.pop();track=trackstack.pop();trackstack.push(track);
		};
		pyjamas.Window.alert.__name__ = 'alert';

		pyjamas.Window.alert.parse_kwargs = function ( __kwargs, msg ) {
			if (typeof msg == 'undefined') {
				msg=__kwargs.msg;
				delete __kwargs.msg;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.msg != 'undefined') {
				pyjs__exception_func_multiple_values('pyjamas.Window.alert', 'msg');
			}
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('pyjamas.Window.alert', i);
				}
			}
			var __r = [msg];
			for (var pyjs__va_arg = 2;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		};
		track.lineno=22;
		pyjamas.Window.confirm = function(msg) {
			if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length);

    return $wnd.confirm(msg);
    
		};
		pyjamas.Window.confirm.__name__ = 'confirm';

		pyjamas.Window.confirm.parse_kwargs = function ( __kwargs, msg ) {
			if (typeof msg == 'undefined') {
				msg=__kwargs.msg;
				delete __kwargs.msg;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.msg != 'undefined') {
				pyjs__exception_func_multiple_values('pyjamas.Window.confirm', 'msg');
			}
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('pyjamas.Window.confirm', i);
				}
			}
			var __r = [msg];
			for (var pyjs__va_arg = 2;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		};
		track.lineno=27;
		pyjamas.Window.prompt = function(msg, defaultReply) {
			if (pyjs_options.arg_count && (arguments.length < 1 || arguments.length > 2)) pyjs__exception_func_param(arguments.callee.__name__, 1, 2, arguments.length);
			if (typeof defaultReply == 'undefined') defaultReply=String('');

        return $wnd.prompt(msg, defaultReply);
    
		};
		pyjamas.Window.prompt.__name__ = 'prompt';

		pyjamas.Window.prompt.parse_kwargs = function ( __kwargs, msg, defaultReply ) {
			if (typeof msg == 'undefined') {
				msg=__kwargs.msg;
				delete __kwargs.msg;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.msg != 'undefined') {
				pyjs__exception_func_multiple_values('pyjamas.Window.prompt', 'msg');
			}
			if (typeof defaultReply == 'undefined') {
				defaultReply=__kwargs.defaultReply;
				delete __kwargs.defaultReply;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.defaultReply != 'undefined') {
				pyjs__exception_func_multiple_values('pyjamas.Window.prompt', 'defaultReply');
			}
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('pyjamas.Window.prompt', i);
				}
			}
			var __r = [msg, defaultReply];
			for (var pyjs__va_arg = 3;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		};
		track.lineno=32;
		pyjamas.Window.enableScrolling = function(enable) {
			if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length);
			track={module:'pyjamas.Window',lineno:32};trackstack.push(track);
			track.module='pyjamas.Window';
			track.lineno=32;
			track.lineno=35;

   $doc.body.style.overflow = enable ? 'auto' : 'hidden';
   
			trackstack.pop();track=trackstack.pop();trackstack.push(track);
		};
		pyjamas.Window.enableScrolling.__name__ = 'enableScrolling';

		pyjamas.Window.enableScrolling.parse_kwargs = function ( __kwargs, enable ) {
			if (typeof enable == 'undefined') {
				enable=__kwargs.enable;
				delete __kwargs.enable;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.enable != 'undefined') {
				pyjs__exception_func_multiple_values('pyjamas.Window.enableScrolling', 'enable');
			}
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('pyjamas.Window.enableScrolling', i);
				}
			}
			var __r = [enable];
			for (var pyjs__va_arg = 2;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		};
		track.lineno=37;
		pyjamas.Window.scrollBy = function(x, y) {
			if (pyjs_options.arg_count && arguments.length != 2) pyjs__exception_func_param(arguments.callee.__name__, 2, 2, arguments.length);
			track={module:'pyjamas.Window',lineno:37};trackstack.push(track);
			track.module='pyjamas.Window';
			track.lineno=37;
			track.lineno=40;

    $wnd.scrollBy(x, y);
    
			trackstack.pop();track=trackstack.pop();trackstack.push(track);
		};
		pyjamas.Window.scrollBy.__name__ = 'scrollBy';

		pyjamas.Window.scrollBy.parse_kwargs = function ( __kwargs, x, y ) {
			if (typeof x == 'undefined') {
				x=__kwargs.x;
				delete __kwargs.x;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.x != 'undefined') {
				pyjs__exception_func_multiple_values('pyjamas.Window.scrollBy', 'x');
			}
			if (typeof y == 'undefined') {
				y=__kwargs.y;
				delete __kwargs.y;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.y != 'undefined') {
				pyjs__exception_func_multiple_values('pyjamas.Window.scrollBy', 'y');
			}
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('pyjamas.Window.scrollBy', i);
				}
			}
			var __r = [x, y];
			for (var pyjs__va_arg = 3;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		};
		track.lineno=42;
		pyjamas.Window.scroll = function(x, y) {
			if (pyjs_options.arg_count && arguments.length != 2) pyjs__exception_func_param(arguments.callee.__name__, 2, 2, arguments.length);
			track={module:'pyjamas.Window',lineno:42};trackstack.push(track);
			track.module='pyjamas.Window';
			track.lineno=42;
			track.lineno=45;

    $wnd.scroll(x, y);
    
			trackstack.pop();track=trackstack.pop();trackstack.push(track);
		};
		pyjamas.Window.scroll.__name__ = 'scroll';

		pyjamas.Window.scroll.parse_kwargs = function ( __kwargs, x, y ) {
			if (typeof x == 'undefined') {
				x=__kwargs.x;
				delete __kwargs.x;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.x != 'undefined') {
				pyjs__exception_func_multiple_values('pyjamas.Window.scroll', 'x');
			}
			if (typeof y == 'undefined') {
				y=__kwargs.y;
				delete __kwargs.y;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.y != 'undefined') {
				pyjs__exception_func_multiple_values('pyjamas.Window.scroll', 'y');
			}
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('pyjamas.Window.scroll', i);
				}
			}
			var __r = [x, y];
			for (var pyjs__va_arg = 3;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		};
		track.lineno=47;
		pyjamas.Window.getClientHeight = function() {
			if (pyjs_options.arg_count && arguments.length != 0) pyjs__exception_func_param(arguments.callee.__name__, 0, 0, arguments.length);

    if ($wnd.innerHeight)
        return $wnd.innerHeight;
    return $doc.body.clientHeight;
    
		};
		pyjamas.Window.getClientHeight.__name__ = 'getClientHeight';

		pyjamas.Window.getClientHeight.parse_kwargs = function ( __kwargs ) {
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('pyjamas.Window.getClientHeight', i);
				}
			}
			var __r = [];
			for (var pyjs__va_arg = 1;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		};
		track.lineno=54;
		pyjamas.Window.getClientWidth = function() {
			if (pyjs_options.arg_count && arguments.length != 0) pyjs__exception_func_param(arguments.callee.__name__, 0, 0, arguments.length);

    if ($wnd.innerWidth)
        return $wnd.innerWidth;
    return $doc.body.clientWidth;
    
		};
		pyjamas.Window.getClientWidth.__name__ = 'getClientWidth';

		pyjamas.Window.getClientWidth.parse_kwargs = function ( __kwargs ) {
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('pyjamas.Window.getClientWidth', i);
				}
			}
			var __r = [];
			for (var pyjs__va_arg = 1;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		};
		track.lineno=61;
		pyjamas.Window.setLocation = function(url) {
			if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length);
			track={module:'pyjamas.Window',lineno:61};trackstack.push(track);
			track.module='pyjamas.Window';
			track.lineno=61;
			track.lineno=64;

    $wnd.location = url;
    
			trackstack.pop();track=trackstack.pop();trackstack.push(track);
		};
		pyjamas.Window.setLocation.__name__ = 'setLocation';

		pyjamas.Window.setLocation.parse_kwargs = function ( __kwargs, url ) {
			if (typeof url == 'undefined') {
				url=__kwargs.url;
				delete __kwargs.url;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.url != 'undefined') {
				pyjs__exception_func_multiple_values('pyjamas.Window.setLocation', 'url');
			}
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('pyjamas.Window.setLocation', i);
				}
			}
			var __r = [url];
			for (var pyjs__va_arg = 2;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		};
		track.lineno=66;
		pyjamas.Window.location = null;
		track.lineno=68;
		pyjamas.Window.getLocation = function() {
			if (pyjs_options.arg_count && arguments.length != 0) pyjs__exception_func_param(arguments.callee.__name__, 0, 0, arguments.length);
			track={module:'pyjamas.Window',lineno:68};trackstack.push(track);
			track.module='pyjamas.Window';
			track.lineno=68;
			track.lineno=69;
			track.lineno=70;
			var wnd_location = null;
			track.lineno=71;
			if (pyjslib.bool(!(pyjamas.Window.location))) {
				track.lineno=72;
wnd_location = $wnd.location;
				track.lineno=73;
				pyjamas.Window.location = pyjamas.Window.Location.Location(wnd_location);
			}
			track.lineno=74;
			track.lineno=74;
			var pyjs__ret = pyjamas.Window.location;
			trackstack.pop();track=trackstack.pop();trackstack.push(track);
			return pyjs__ret;
		};
		pyjamas.Window.getLocation.__name__ = 'getLocation';

		pyjamas.Window.getLocation.parse_kwargs = function ( __kwargs ) {
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('pyjamas.Window.getLocation', i);
				}
			}
			var __r = [];
			for (var pyjs__va_arg = 1;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		};
		track.lineno=77;
		pyjamas.Window.getTitle = function() {
			if (pyjs_options.arg_count && arguments.length != 0) pyjs__exception_func_param(arguments.callee.__name__, 0, 0, arguments.length);

    return $doc.title;
    
		};
		pyjamas.Window.getTitle.__name__ = 'getTitle';

		pyjamas.Window.getTitle.parse_kwargs = function ( __kwargs ) {
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('pyjamas.Window.getTitle', i);
				}
			}
			var __r = [];
			for (var pyjs__va_arg = 1;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		};
		track.lineno=82;
		pyjamas.Window.open = function(url, name, features) {
			if (pyjs_options.arg_count && arguments.length != 3) pyjs__exception_func_param(arguments.callee.__name__, 3, 3, arguments.length);
			track={module:'pyjamas.Window',lineno:82};trackstack.push(track);
			track.module='pyjamas.Window';
			track.lineno=82;
			track.lineno=85;

    $wnd.open(url, name, features);
    
			trackstack.pop();track=trackstack.pop();trackstack.push(track);
		};
		pyjamas.Window.open.__name__ = 'open';

		pyjamas.Window.open.parse_kwargs = function ( __kwargs, url, name, features ) {
			if (typeof url == 'undefined') {
				url=__kwargs.url;
				delete __kwargs.url;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.url != 'undefined') {
				pyjs__exception_func_multiple_values('pyjamas.Window.open', 'url');
			}
			if (typeof name == 'undefined') {
				name=__kwargs.name;
				delete __kwargs.name;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.name != 'undefined') {
				pyjs__exception_func_multiple_values('pyjamas.Window.open', 'name');
			}
			if (typeof features == 'undefined') {
				features=__kwargs.features;
				delete __kwargs.features;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.features != 'undefined') {
				pyjs__exception_func_multiple_values('pyjamas.Window.open', 'features');
			}
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('pyjamas.Window.open', i);
				}
			}
			var __r = [url, name, features];
			for (var pyjs__va_arg = 4;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		};
		track.lineno=87;
		pyjamas.Window.removeWindowCloseListener = function(listener) {
			if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length);
			track={module:'pyjamas.Window',lineno:87};trackstack.push(track);
			track.module='pyjamas.Window';
			track.lineno=87;
			track.lineno=88;
			track.lineno=89;
			pyjamas.Window.closingListeners.remove(listener);
			trackstack.pop();track=trackstack.pop();trackstack.push(track);
			return null;
		};
		pyjamas.Window.removeWindowCloseListener.__name__ = 'removeWindowCloseListener';

		pyjamas.Window.removeWindowCloseListener.parse_kwargs = function ( __kwargs, listener ) {
			if (typeof listener == 'undefined') {
				listener=__kwargs.listener;
				delete __kwargs.listener;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.listener != 'undefined') {
				pyjs__exception_func_multiple_values('pyjamas.Window.removeWindowCloseListener', 'listener');
			}
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('pyjamas.Window.removeWindowCloseListener', i);
				}
			}
			var __r = [listener];
			for (var pyjs__va_arg = 2;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		};
		track.lineno=91;
		pyjamas.Window.removeWindowResizeListener = function(listener) {
			if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length);
			track={module:'pyjamas.Window',lineno:91};trackstack.push(track);
			track.module='pyjamas.Window';
			track.lineno=91;
			track.lineno=92;
			track.lineno=93;
			pyjamas.Window.resizeListeners.remove(listener);
			trackstack.pop();track=trackstack.pop();trackstack.push(track);
			return null;
		};
		pyjamas.Window.removeWindowResizeListener.__name__ = 'removeWindowResizeListener';

		pyjamas.Window.removeWindowResizeListener.parse_kwargs = function ( __kwargs, listener ) {
			if (typeof listener == 'undefined') {
				listener=__kwargs.listener;
				delete __kwargs.listener;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.listener != 'undefined') {
				pyjs__exception_func_multiple_values('pyjamas.Window.removeWindowResizeListener', 'listener');
			}
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('pyjamas.Window.removeWindowResizeListener', i);
				}
			}
			var __r = [listener];
			for (var pyjs__va_arg = 2;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		};
		track.lineno=95;
		pyjamas.Window.setMargin = function(size) {
			if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length);
			track={module:'pyjamas.Window',lineno:95};trackstack.push(track);
			track.module='pyjamas.Window';
			track.lineno=95;
			track.lineno=98;

    $doc.body.style.margin = size;
    
			trackstack.pop();track=trackstack.pop();trackstack.push(track);
		};
		pyjamas.Window.setMargin.__name__ = 'setMargin';

		pyjamas.Window.setMargin.parse_kwargs = function ( __kwargs, size ) {
			if (typeof size == 'undefined') {
				size=__kwargs.size;
				delete __kwargs.size;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.size != 'undefined') {
				pyjs__exception_func_multiple_values('pyjamas.Window.setMargin', 'size');
			}
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('pyjamas.Window.setMargin', i);
				}
			}
			var __r = [size];
			for (var pyjs__va_arg = 2;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		};
		track.lineno=100;
		pyjamas.Window.setTitle = function(title) {
			if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length);
			track={module:'pyjamas.Window',lineno:100};trackstack.push(track);
			track.module='pyjamas.Window';
			track.lineno=100;
			track.lineno=103;

    $doc.title = title;
    
			trackstack.pop();track=trackstack.pop();trackstack.push(track);
		};
		pyjamas.Window.setTitle.__name__ = 'setTitle';

		pyjamas.Window.setTitle.parse_kwargs = function ( __kwargs, title ) {
			if (typeof title == 'undefined') {
				title=__kwargs.title;
				delete __kwargs.title;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.title != 'undefined') {
				pyjs__exception_func_multiple_values('pyjamas.Window.setTitle', 'title');
			}
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('pyjamas.Window.setTitle', i);
				}
			}
			var __r = [title];
			for (var pyjs__va_arg = 2;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		};
		track.lineno=105;
		pyjamas.Window.setOnError = function(onError) {
			if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length);
			if (pyjslib.bool(!(pyjslib.callable(onError)))) {
				throw (pyjslib.TypeError(String('object is not callable')));
			}
    $wnd.onerror=function(msg, url, linenumber){
        return onError(msg, url, linenumber);
    }
    
		};
		pyjamas.Window.setOnError.__name__ = 'setOnError';

		pyjamas.Window.setOnError.parse_kwargs = function ( __kwargs, onError ) {
			if (typeof onError == 'undefined') {
				onError=__kwargs.onError;
				delete __kwargs.onError;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.onError != 'undefined') {
				pyjs__exception_func_multiple_values('pyjamas.Window.setOnError', 'onError');
			}
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('pyjamas.Window.setOnError', i);
				}
			}
			var __r = [onError];
			for (var pyjs__va_arg = 2;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		};
		track.lineno=114;
		pyjamas.Window.onError = function(msg, url, linenumber) {
			if (pyjs_options.arg_count && arguments.length != 3) pyjs__exception_func_param(arguments.callee.__name__, 3, 3, arguments.length);
			track={module:'pyjamas.Window',lineno:114};trackstack.push(track);
			track.module='pyjamas.Window';
			track.lineno=114;
			track.lineno=115;
			var dialog = $doc.createElement("div");
			track.lineno=116;
			dialog.className = String('errordialog');
			track.lineno=118;
			var tracestr = sys.trackstackstr(trackstack.slice(0, -1));
			track.lineno=119;
			tracestr = tracestr.replace(String('\x0A'), String('\x3Cbr /\x3E\x0A\x26nbsp\x3B\x26nbsp\x3B\x26nbsp\x3B'));
			track.lineno=120;
			dialog.innerHTML =  (  (  (  (  (  ( String('\x26nbsp\x3B\x3Cb style=\x22color:red\x22\x3EJavaScript Error: \x3C/b\x3E') + msg )  + String(' at line number ') )  + linenumber )  + String('. Please inform webmaster.') )  + String('\x3Cbr /\x3E\x26nbsp\x3B\x26nbsp\x3B\x26nbsp\x3B') )  + tracestr ) ;
			track.lineno=123;
$doc.body.appendChild(dialog)
			track.lineno=124;
			track.lineno=124;
			var pyjs__ret = true;
			trackstack.pop();track=trackstack.pop();trackstack.push(track);
			return pyjs__ret;
		};
		pyjamas.Window.onError.__name__ = 'onError';

		pyjamas.Window.onError.parse_kwargs = function ( __kwargs, msg, url, linenumber ) {
			if (typeof msg == 'undefined') {
				msg=__kwargs.msg;
				delete __kwargs.msg;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.msg != 'undefined') {
				pyjs__exception_func_multiple_values('pyjamas.Window.onError', 'msg');
			}
			if (typeof url == 'undefined') {
				url=__kwargs.url;
				delete __kwargs.url;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.url != 'undefined') {
				pyjs__exception_func_multiple_values('pyjamas.Window.onError', 'url');
			}
			if (typeof linenumber == 'undefined') {
				linenumber=__kwargs.linenumber;
				delete __kwargs.linenumber;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.linenumber != 'undefined') {
				pyjs__exception_func_multiple_values('pyjamas.Window.onError', 'linenumber');
			}
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('pyjamas.Window.onError', i);
				}
			}
			var __r = [msg, url, linenumber];
			for (var pyjs__va_arg = 4;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		};
		track.lineno=127;
		pyjamas.Window.onClosed = function() {
			if (pyjs_options.arg_count && arguments.length != 0) pyjs__exception_func_param(arguments.callee.__name__, 0, 0, arguments.length);
			track={module:'pyjamas.Window',lineno:127};trackstack.push(track);
			track.module='pyjamas.Window';
			track.lineno=127;
			track.lineno=128;
			pyjamas.Window.fireClosedImpl();
			trackstack.pop();track=trackstack.pop();trackstack.push(track);
			return null;
		};
		pyjamas.Window.onClosed.__name__ = 'onClosed';

		pyjamas.Window.onClosed.parse_kwargs = function ( __kwargs ) {
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('pyjamas.Window.onClosed', i);
				}
			}
			var __r = [];
			for (var pyjs__va_arg = 1;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		};
		track.lineno=131;
		pyjamas.Window.onClosing = function() {
			if (pyjs_options.arg_count && arguments.length != 0) pyjs__exception_func_param(arguments.callee.__name__, 0, 0, arguments.length);
			track={module:'pyjamas.Window',lineno:131};trackstack.push(track);
			track.module='pyjamas.Window';
			track.lineno=131;
			track.lineno=132;
			pyjamas.Window.fireClosingImpl();
			trackstack.pop();track=trackstack.pop();trackstack.push(track);
			return null;
		};
		pyjamas.Window.onClosing.__name__ = 'onClosing';

		pyjamas.Window.onClosing.parse_kwargs = function ( __kwargs ) {
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('pyjamas.Window.onClosing', i);
				}
			}
			var __r = [];
			for (var pyjs__va_arg = 1;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		};
		track.lineno=135;
		pyjamas.Window.onResize = function() {
			if (pyjs_options.arg_count && arguments.length != 0) pyjs__exception_func_param(arguments.callee.__name__, 0, 0, arguments.length);
			track={module:'pyjamas.Window',lineno:135};trackstack.push(track);
			track.module='pyjamas.Window';
			track.lineno=135;
			track.lineno=136;
			pyjamas.Window.fireResizedImpl();
			trackstack.pop();track=trackstack.pop();trackstack.push(track);
			return null;
		};
		pyjamas.Window.onResize.__name__ = 'onResize';

		pyjamas.Window.onResize.parse_kwargs = function ( __kwargs ) {
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('pyjamas.Window.onResize', i);
				}
			}
			var __r = [];
			for (var pyjs__va_arg = 1;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		};
		track.lineno=138;
		pyjamas.Window.fireClosedAndCatch = function(handler) {
			if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length);
			track={module:'pyjamas.Window',lineno:138};trackstack.push(track);
			track.module='pyjamas.Window';
			track.lineno=138;
			track.lineno=140;
			trackstack.pop();track=trackstack.pop();trackstack.push(track);
			return null;
		};
		pyjamas.Window.fireClosedAndCatch.__name__ = 'fireClosedAndCatch';

		pyjamas.Window.fireClosedAndCatch.parse_kwargs = function ( __kwargs, handler ) {
			if (typeof handler == 'undefined') {
				handler=__kwargs.handler;
				delete __kwargs.handler;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.handler != 'undefined') {
				pyjs__exception_func_multiple_values('pyjamas.Window.fireClosedAndCatch', 'handler');
			}
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('pyjamas.Window.fireClosedAndCatch', i);
				}
			}
			var __r = [handler];
			for (var pyjs__va_arg = 2;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		};
		track.lineno=142;
		pyjamas.Window.fireClosedImpl = function() {
			if (pyjs_options.arg_count && arguments.length != 0) pyjs__exception_func_param(arguments.callee.__name__, 0, 0, arguments.length);
			track={module:'pyjamas.Window',lineno:142};trackstack.push(track);
			track.module='pyjamas.Window';
			track.lineno=142;
			track.lineno=143;
			track.lineno=145;
			var pyjs__trackstack_size_1=trackstack.length;
			var __listener = pyjamas.Window.closingListeners.__iter__();
			try {
				while (true) {
					var listener = __listener.next();
					
					track.lineno=146;
					listener.onWindowClosed();
				}
			} catch (e) {
				if (e.__name__ != 'StopIteration') {
					throw e;
				}
			}
			if (trackstack.length > pyjs__trackstack_size_1) {
				trackstack = trackstack.slice(0,pyjs__trackstack_size_1);
				track = trackstack.slice(-1)[0];
			}
			track.module='pyjamas.Window';
			trackstack.pop();track=trackstack.pop();trackstack.push(track);
			return null;
		};
		pyjamas.Window.fireClosedImpl.__name__ = 'fireClosedImpl';

		pyjamas.Window.fireClosedImpl.parse_kwargs = function ( __kwargs ) {
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('pyjamas.Window.fireClosedImpl', i);
				}
			}
			var __r = [];
			for (var pyjs__va_arg = 1;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		};
		track.lineno=148;
		pyjamas.Window.fireClosingAndCatch = function(handler) {
			if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length);
			track={module:'pyjamas.Window',lineno:148};trackstack.push(track);
			track.module='pyjamas.Window';
			track.lineno=148;
			track.lineno=150;
			trackstack.pop();track=trackstack.pop();trackstack.push(track);
			return null;
		};
		pyjamas.Window.fireClosingAndCatch.__name__ = 'fireClosingAndCatch';

		pyjamas.Window.fireClosingAndCatch.parse_kwargs = function ( __kwargs, handler ) {
			if (typeof handler == 'undefined') {
				handler=__kwargs.handler;
				delete __kwargs.handler;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.handler != 'undefined') {
				pyjs__exception_func_multiple_values('pyjamas.Window.fireClosingAndCatch', 'handler');
			}
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('pyjamas.Window.fireClosingAndCatch', i);
				}
			}
			var __r = [handler];
			for (var pyjs__va_arg = 2;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		};
		track.lineno=152;
		pyjamas.Window.fireClosingImpl = function() {
			if (pyjs_options.arg_count && arguments.length != 0) pyjs__exception_func_param(arguments.callee.__name__, 0, 0, arguments.length);
			track={module:'pyjamas.Window',lineno:152};trackstack.push(track);
			track.module='pyjamas.Window';
			track.lineno=152;
			track.lineno=153;
			track.lineno=155;
			var ret = null;
			track.lineno=156;
			var pyjs__trackstack_size_1=trackstack.length;
			var __listener = pyjamas.Window.closingListeners.__iter__();
			try {
				while (true) {
					var listener = __listener.next();
					
					track.lineno=157;
					var msg = listener.onWindowClosing();
					track.lineno=158;
					if (pyjslib.bool(pyjslib.eq(ret, null))) {
						track.lineno=159;
						ret = msg;
					}
				}
			} catch (e) {
				if (e.__name__ != 'StopIteration') {
					throw e;
				}
			}
			if (trackstack.length > pyjs__trackstack_size_1) {
				trackstack = trackstack.slice(0,pyjs__trackstack_size_1);
				track = trackstack.slice(-1)[0];
			}
			track.module='pyjamas.Window';
			track.lineno=160;
			track.lineno=160;
			var pyjs__ret = ret;
			trackstack.pop();track=trackstack.pop();trackstack.push(track);
			return pyjs__ret;
		};
		pyjamas.Window.fireClosingImpl.__name__ = 'fireClosingImpl';

		pyjamas.Window.fireClosingImpl.parse_kwargs = function ( __kwargs ) {
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('pyjamas.Window.fireClosingImpl', i);
				}
			}
			var __r = [];
			for (var pyjs__va_arg = 1;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		};
		track.lineno=162;
		pyjamas.Window.fireResizedAndCatch = function(handler) {
			if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length);
			track={module:'pyjamas.Window',lineno:162};trackstack.push(track);
			track.module='pyjamas.Window';
			track.lineno=162;
			track.lineno=164;
			trackstack.pop();track=trackstack.pop();trackstack.push(track);
			return null;
		};
		pyjamas.Window.fireResizedAndCatch.__name__ = 'fireResizedAndCatch';

		pyjamas.Window.fireResizedAndCatch.parse_kwargs = function ( __kwargs, handler ) {
			if (typeof handler == 'undefined') {
				handler=__kwargs.handler;
				delete __kwargs.handler;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.handler != 'undefined') {
				pyjs__exception_func_multiple_values('pyjamas.Window.fireResizedAndCatch', 'handler');
			}
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('pyjamas.Window.fireResizedAndCatch', i);
				}
			}
			var __r = [handler];
			for (var pyjs__va_arg = 2;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		};
		track.lineno=166;
		pyjamas.Window.fireResizedImpl = function() {
			if (pyjs_options.arg_count && arguments.length != 0) pyjs__exception_func_param(arguments.callee.__name__, 0, 0, arguments.length);
			track={module:'pyjamas.Window',lineno:166};trackstack.push(track);
			track.module='pyjamas.Window';
			track.lineno=166;
			track.lineno=167;
			track.lineno=169;
			var pyjs__trackstack_size_1=trackstack.length;
			var __listener = pyjamas.Window.resizeListeners.__iter__();
			try {
				while (true) {
					var listener = __listener.next();
					
					track.lineno=170;
					listener.onWindowResized(pyjamas.Window.getClientWidth(), pyjamas.Window.getClientHeight());
				}
			} catch (e) {
				if (e.__name__ != 'StopIteration') {
					throw e;
				}
			}
			if (trackstack.length > pyjs__trackstack_size_1) {
				trackstack = trackstack.slice(0,pyjs__trackstack_size_1);
				track = trackstack.slice(-1)[0];
			}
			track.module='pyjamas.Window';
			trackstack.pop();track=trackstack.pop();trackstack.push(track);
			return null;
		};
		pyjamas.Window.fireResizedImpl.__name__ = 'fireResizedImpl';

		pyjamas.Window.fireResizedImpl.parse_kwargs = function ( __kwargs ) {
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('pyjamas.Window.fireResizedImpl', i);
				}
			}
			var __r = [];
			for (var pyjs__va_arg = 1;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		};
		track.lineno=172;
		pyjamas.Window.init_listeners = function() {
			if (pyjs_options.arg_count && arguments.length != 0) pyjs__exception_func_param(arguments.callee.__name__, 0, 0, arguments.length);
			track={module:'pyjamas.Window',lineno:172};trackstack.push(track);
			track.module='pyjamas.Window';
			track.lineno=172;
			track.lineno=173;
			track.lineno=174;
			track.lineno=175;
			if (pyjslib.bool(!(pyjamas.Window.closingListeners))) {
				track.lineno=176;
				pyjamas.Window.closingListeners = new pyjslib.List([]);
			}
			track.lineno=177;
			if (pyjslib.bool(!(pyjamas.Window.resizeListeners))) {
				track.lineno=178;
				pyjamas.Window.resizeListeners = new pyjslib.List([]);
			}
			trackstack.pop();track=trackstack.pop();trackstack.push(track);
			return null;
		};
		pyjamas.Window.init_listeners.__name__ = 'init_listeners';

		pyjamas.Window.init_listeners.parse_kwargs = function ( __kwargs ) {
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('pyjamas.Window.init_listeners', i);
				}
			}
			var __r = [];
			for (var pyjs__va_arg = 1;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		};
		track.lineno=180;
		pyjamas.Window.init = function() {
			if (pyjs_options.arg_count && arguments.length != 0) pyjs__exception_func_param(arguments.callee.__name__, 0, 0, arguments.length);
			track={module:'pyjamas.Window',lineno:180};trackstack.push(track);
			track.module='pyjamas.Window';
			track.lineno=180;
			track.lineno=181;
			track.lineno=182;
			pyjamas.Window.init_listeners();
			track.lineno=201;
			String('\x0A    JS(\x22\x22\x22\x0A    $wnd.__pygwt_initHandlers(\x0A        function() {\x0A            Window.onResize()\x3B\x0A        },\x0A        function() {\x0A            return Window.onClosing()\x3B\x0A        },\x0A        function() {\x0A            Window.onClosed()\x3B\x0A            /*$wnd.onresize = null\x3B\x0A            $wnd.onbeforeclose = null\x3B\x0A            $wnd.onclose = null\x3B*/\x0A        }\x0A    )\x3B\x0A    \x22\x22\x22)\x0A    setOnError(onError)\x0A    ')
			trackstack.pop();track=trackstack.pop();trackstack.push(track);
			return null;
		};
		pyjamas.Window.init.__name__ = 'init';

		pyjamas.Window.init.parse_kwargs = function ( __kwargs ) {
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('pyjamas.Window.init', i);
				}
			}
			var __r = [];
			for (var pyjs__va_arg = 1;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		};
		track.lineno=203;
		pyjamas.Window.init();

	} catch (pyjs_attr_err) {throw pyjslib._errorMapping(pyjs_attr_err)};
return this;
}; /* end pyjamas.Window */ 




pyjamas.Window_loaded_fn = function() {
}

pyjamas.Window_prepare_mod = function() {
    if ((typeof (module_load_request['pyjamas.Window']) == 'undefined') ||
        (module_load_request['pyjamas.Window'] < 2)) {
        module_load_request['pyjamas.Window'] = 2;
    }
    var modnames = new pyjslib.List([
		new pyjslib.List([
			'pyjamas']),
		new pyjslib.List([
			'pyjamas.Location']),
		new pyjslib.List([
			])
	]);
    sys.overrides.update(new pyjslib.Dict({
		'mozilla.pyjslib': 'mozilla.pyjslib',
		'mozilla.pyjamas.DOM': 'mozilla.pyjamas.DOM'
	}));
    path = sys.loadpath;
    /*
    pyjslib.preload_app_modules(path, modnames, pyjamas.Window_loaded_fn,
                                            0,
                                            null);
                                            //'pyjamas.Window');
                                            */
    //alert("module ajax loaded fn called pyjamas.Window");

    if (sys.appname != 'pyjamas.Window')
    {
        if (module_load_request['pyjamas.Window'] < 3) {
            module_load_request['pyjamas.Window'] = 3;
        }
    }
}

//alert("module ajax loaded pyjamas.Window");

pyjamas.Window_prepare_mod();


// pyjamas.ui.UIObject

// module libs (usually imported javascript)



// module code

pyjamas.ui.UIObject = function (__mod_name__) {
	if(pyjamas.ui.UIObject.__was_initialized__) return;
	pyjamas.ui.UIObject.__was_initialized__ = true;
	if (__mod_name__ == null) __mod_name__ = 'pyjamas.ui.UIObject';
	var __name__ = pyjamas.ui.UIObject.__name__ = __mod_name__;
	pyjamas.ui.UIObject.__track_lines__ = new Array();
	var UIObject = pyjamas.ui.UIObject;

		pyjamas.ui.UIObject.__track_lines__[1] = "pyjamas.ui.UIObject.py, line 1:\n    # Copyright 2006 James Tauber and contributors";
		pyjamas.ui.UIObject.__track_lines__[14] = "pyjamas.ui.UIObject.py, line 14:\n    from pyjamas import DOM";
		pyjamas.ui.UIObject.__track_lines__[15] = "pyjamas.ui.UIObject.py, line 15:\n    from pyjamas import Window";
		pyjamas.ui.UIObject.__track_lines__[17] = "pyjamas.ui.UIObject.py, line 17:\n    def setStyleName(element, style, add):";
		pyjamas.ui.UIObject.__track_lines__[19] = "pyjamas.ui.UIObject.py, line 19:\n    oldStyle = DOM.getAttribute(element, \"className\")";
		pyjamas.ui.UIObject.__track_lines__[20] = "pyjamas.ui.UIObject.py, line 20:\n    if oldStyle == None:";
		pyjamas.ui.UIObject.__track_lines__[21] = "pyjamas.ui.UIObject.py, line 21:\n    oldStyle = \"\"";
		pyjamas.ui.UIObject.__track_lines__[22] = "pyjamas.ui.UIObject.py, line 22:\n    idx = oldStyle.find(style)";
		pyjamas.ui.UIObject.__track_lines__[25] = "pyjamas.ui.UIObject.py, line 25:\n    lastPos = len(oldStyle)";
		pyjamas.ui.UIObject.__track_lines__[26] = "pyjamas.ui.UIObject.py, line 26:\n    while idx != -1:";
		pyjamas.ui.UIObject.__track_lines__[27] = "pyjamas.ui.UIObject.py, line 27:\n    if idx == 0 or (oldStyle[idx - 1] == \" \"):";
		pyjamas.ui.UIObject.__track_lines__[28] = "pyjamas.ui.UIObject.py, line 28:\n    last = idx + len(style)";
		pyjamas.ui.UIObject.__track_lines__[29] = "pyjamas.ui.UIObject.py, line 29:\n    if (last == lastPos) or ((last < lastPos) and (oldStyle[last] == \" \")):";
		pyjamas.ui.UIObject.__track_lines__[30] = "pyjamas.ui.UIObject.py, line 30:\n    break";
		pyjamas.ui.UIObject.__track_lines__[31] = "pyjamas.ui.UIObject.py, line 31:\n    idx = oldStyle.find(style, idx + 1)";
		pyjamas.ui.UIObject.__track_lines__[33] = "pyjamas.ui.UIObject.py, line 33:\n    if add:";
		pyjamas.ui.UIObject.__track_lines__[34] = "pyjamas.ui.UIObject.py, line 34:\n    if idx == -1:";
		pyjamas.ui.UIObject.__track_lines__[35] = "pyjamas.ui.UIObject.py, line 35:\n    DOM.setAttribute(element, \"className\", oldStyle + \" \" + style)";
		pyjamas.ui.UIObject.__track_lines__[37] = "pyjamas.ui.UIObject.py, line 37:\n    if idx != -1:";
		pyjamas.ui.UIObject.__track_lines__[38] = "pyjamas.ui.UIObject.py, line 38:\n    begin = oldStyle[:idx-1]";
		pyjamas.ui.UIObject.__track_lines__[39] = "pyjamas.ui.UIObject.py, line 39:\n    end = oldStyle[idx + len(style):]";
		pyjamas.ui.UIObject.__track_lines__[40] = "pyjamas.ui.UIObject.py, line 40:\n    DOM.setAttribute(element, \"className\", begin + end)";
		pyjamas.ui.UIObject.__track_lines__[42] = "pyjamas.ui.UIObject.py, line 42:\n    class UIObject:";
		pyjamas.ui.UIObject.__track_lines__[44] = "pyjamas.ui.UIObject.py, line 44:\n    def __init__(self, **kwargs):";
		pyjamas.ui.UIObject.__track_lines__[48] = "pyjamas.ui.UIObject.py, line 48:\n    if kwargs:";
		pyjamas.ui.UIObject.__track_lines__[49] = "pyjamas.ui.UIObject.py, line 49:\n    Window.alert(self.__name__ + repr(kwargs))";
		pyjamas.ui.UIObject.__track_lines__[50] = "pyjamas.ui.UIObject.py, line 50:\n    for prop in kwargs.keys():";
		pyjamas.ui.UIObject.__track_lines__[51] = "pyjamas.ui.UIObject.py, line 51:\n    fn = getattr(self, \"set%s\" % prop, None)";
		pyjamas.ui.UIObject.__track_lines__[52] = "pyjamas.ui.UIObject.py, line 52:\n    if fn:";
		pyjamas.ui.UIObject.__track_lines__[53] = "pyjamas.ui.UIObject.py, line 53:\n    fn(keys[prop])";
		pyjamas.ui.UIObject.__track_lines__[55] = "pyjamas.ui.UIObject.py, line 55:\n    def getAbsoluteLeft(self):";
		pyjamas.ui.UIObject.__track_lines__[56] = "pyjamas.ui.UIObject.py, line 56:\n    return DOM.getAbsoluteLeft(self.getElement())";
		pyjamas.ui.UIObject.__track_lines__[58] = "pyjamas.ui.UIObject.py, line 58:\n    def getAbsoluteTop(self):";
		pyjamas.ui.UIObject.__track_lines__[59] = "pyjamas.ui.UIObject.py, line 59:\n    return DOM.getAbsoluteTop(self.getElement())";
		pyjamas.ui.UIObject.__track_lines__[61] = "pyjamas.ui.UIObject.py, line 61:\n    def getElement(self):";
		pyjamas.ui.UIObject.__track_lines__[63] = "pyjamas.ui.UIObject.py, line 63:\n    return self.element";
		pyjamas.ui.UIObject.__track_lines__[65] = "pyjamas.ui.UIObject.py, line 65:\n    def getOffsetHeight(self):";
		pyjamas.ui.UIObject.__track_lines__[66] = "pyjamas.ui.UIObject.py, line 66:\n    return DOM.getIntAttribute(self.element, \"offsetHeight\")";
		pyjamas.ui.UIObject.__track_lines__[68] = "pyjamas.ui.UIObject.py, line 68:\n    def getOffsetWidth(self):";
		pyjamas.ui.UIObject.__track_lines__[69] = "pyjamas.ui.UIObject.py, line 69:\n    return DOM.getIntAttribute(self.element, \"offsetWidth\")";
		pyjamas.ui.UIObject.__track_lines__[71] = "pyjamas.ui.UIObject.py, line 71:\n    def getStyleName(self):";
		pyjamas.ui.UIObject.__track_lines__[72] = "pyjamas.ui.UIObject.py, line 72:\n    return DOM.getAttribute(self.element, \"className\")";
		pyjamas.ui.UIObject.__track_lines__[74] = "pyjamas.ui.UIObject.py, line 74:\n    def getStylePrimaryName(self):";
		pyjamas.ui.UIObject.__track_lines__[76] = "pyjamas.ui.UIObject.py, line 76:\n    fullClassName = self.getStyleName()";
		pyjamas.ui.UIObject.__track_lines__[77] = "pyjamas.ui.UIObject.py, line 77:\n    if fullClassName: return fullClassName.split()[0]";
		pyjamas.ui.UIObject.__track_lines__[79] = "pyjamas.ui.UIObject.py, line 79:\n    def getTitle(self):";
		pyjamas.ui.UIObject.__track_lines__[80] = "pyjamas.ui.UIObject.py, line 80:\n    return DOM.getAttribute(self.element, \"title\")";
		pyjamas.ui.UIObject.__track_lines__[82] = "pyjamas.ui.UIObject.py, line 82:\n    def setElement(self, element):";
		pyjamas.ui.UIObject.__track_lines__[84] = "pyjamas.ui.UIObject.py, line 84:\n    self.element = element";
		pyjamas.ui.UIObject.__track_lines__[86] = "pyjamas.ui.UIObject.py, line 86:\n    def setHeight(self, height):";
		pyjamas.ui.UIObject.__track_lines__[89] = "pyjamas.ui.UIObject.py, line 89:\n    DOM.setStyleAttribute(self.element, \"height\", height)";
		pyjamas.ui.UIObject.__track_lines__[91] = "pyjamas.ui.UIObject.py, line 91:\n    def getHeight(self):";
		pyjamas.ui.UIObject.__track_lines__[92] = "pyjamas.ui.UIObject.py, line 92:\n    return DOM.getStyleAttribute(self.element, \"height\")";
		pyjamas.ui.UIObject.__track_lines__[94] = "pyjamas.ui.UIObject.py, line 94:\n    def setPixelSize(self, width, height):";
		pyjamas.ui.UIObject.__track_lines__[97] = "pyjamas.ui.UIObject.py, line 97:\n    if width >= 0:";
		pyjamas.ui.UIObject.__track_lines__[98] = "pyjamas.ui.UIObject.py, line 98:\n    self.setWidth(width + \"px\")";
		pyjamas.ui.UIObject.__track_lines__[99] = "pyjamas.ui.UIObject.py, line 99:\n    if height >= 0:";
		pyjamas.ui.UIObject.__track_lines__[100] = "pyjamas.ui.UIObject.py, line 100:\n    self.setHeight(height + \"px\")";
		pyjamas.ui.UIObject.__track_lines__[102] = "pyjamas.ui.UIObject.py, line 102:\n    def setSize(self, width, height):";
		pyjamas.ui.UIObject.__track_lines__[105] = "pyjamas.ui.UIObject.py, line 105:\n    self.setWidth(width)";
		pyjamas.ui.UIObject.__track_lines__[106] = "pyjamas.ui.UIObject.py, line 106:\n    self.setHeight(height)";
		pyjamas.ui.UIObject.__track_lines__[108] = "pyjamas.ui.UIObject.py, line 108:\n    def addStyleName(self, style):";
		pyjamas.ui.UIObject.__track_lines__[112] = "pyjamas.ui.UIObject.py, line 112:\n    self.setStyleName(self.element, style, True)";
		pyjamas.ui.UIObject.__track_lines__[114] = "pyjamas.ui.UIObject.py, line 114:\n    def addStyleDependentName(self, styleSuffix):";
		pyjamas.ui.UIObject.__track_lines__[118] = "pyjamas.ui.UIObject.py, line 118:\n    self.addStyleName(self.getStylePrimaryName()+\"-\"+styleSuffix)";
		pyjamas.ui.UIObject.__track_lines__[120] = "pyjamas.ui.UIObject.py, line 120:\n    def removeStyleName(self, style):";
		pyjamas.ui.UIObject.__track_lines__[123] = "pyjamas.ui.UIObject.py, line 123:\n    self.setStyleName(self.element, style, False)";
		pyjamas.ui.UIObject.__track_lines__[125] = "pyjamas.ui.UIObject.py, line 125:\n    def removeStyleDependentName(self, styleSuffix):";
		pyjamas.ui.UIObject.__track_lines__[127] = "pyjamas.ui.UIObject.py, line 127:\n    self.removeStyleName(self.getStylePrimaryName()+\"-\"+styleSuffix)";
		pyjamas.ui.UIObject.__track_lines__[130] = "pyjamas.ui.UIObject.py, line 130:\n    def setStyleName(self, element, style=None, add=True):";
		pyjamas.ui.UIObject.__track_lines__[135] = "pyjamas.ui.UIObject.py, line 135:\n    if style == None:";
		pyjamas.ui.UIObject.__track_lines__[136] = "pyjamas.ui.UIObject.py, line 136:\n    style = element";
		pyjamas.ui.UIObject.__track_lines__[137] = "pyjamas.ui.UIObject.py, line 137:\n    DOM.setAttribute(self.element, \"className\", style)";
		pyjamas.ui.UIObject.__track_lines__[138] = "pyjamas.ui.UIObject.py, line 138:\n    return";
		pyjamas.ui.UIObject.__track_lines__[139] = "pyjamas.ui.UIObject.py, line 139:\n    setStyleName(element, style, add)";
		pyjamas.ui.UIObject.__track_lines__[141] = "pyjamas.ui.UIObject.py, line 141:\n    def setTitle(self, title):";
		pyjamas.ui.UIObject.__track_lines__[142] = "pyjamas.ui.UIObject.py, line 142:\n    DOM.setAttribute(self.element, \"title\", title)";
		pyjamas.ui.UIObject.__track_lines__[144] = "pyjamas.ui.UIObject.py, line 144:\n    def setWidth(self, width):";
		pyjamas.ui.UIObject.__track_lines__[147] = "pyjamas.ui.UIObject.py, line 147:\n    DOM.setStyleAttribute(self.element, \"width\", width)";
		pyjamas.ui.UIObject.__track_lines__[149] = "pyjamas.ui.UIObject.py, line 149:\n    def getWidth(self):";
		pyjamas.ui.UIObject.__track_lines__[150] = "pyjamas.ui.UIObject.py, line 150:\n    return DOM.getStyleAttribute(self.element, \"width\")";
		pyjamas.ui.UIObject.__track_lines__[152] = "pyjamas.ui.UIObject.py, line 152:\n    def sinkEvents(self, eventBitsToAdd):";
		pyjamas.ui.UIObject.__track_lines__[157] = "pyjamas.ui.UIObject.py, line 157:\n    if self.element:";
		pyjamas.ui.UIObject.__track_lines__[158] = "pyjamas.ui.UIObject.py, line 158:\n    DOM.sinkEvents(self.getElement(), eventBitsToAdd | DOM.getEventsSunk(self.getElement()))";
		pyjamas.ui.UIObject.__track_lines__[160] = "pyjamas.ui.UIObject.py, line 160:\n    def setzIndex(self, index):";
		pyjamas.ui.UIObject.__track_lines__[161] = "pyjamas.ui.UIObject.py, line 161:\n    DOM.setIntStyleAttribute(self.element, \"zIndex\", index)";
		pyjamas.ui.UIObject.__track_lines__[163] = "pyjamas.ui.UIObject.py, line 163:\n    def isVisible(self, element=None):";
		pyjamas.ui.UIObject.__track_lines__[166] = "pyjamas.ui.UIObject.py, line 166:\n    if not element:";
		pyjamas.ui.UIObject.__track_lines__[167] = "pyjamas.ui.UIObject.py, line 167:\n    element = self.element";
		pyjamas.ui.UIObject.__track_lines__[168] = "pyjamas.ui.UIObject.py, line 168:\n    return element.style.display != \"none\"";
		pyjamas.ui.UIObject.__track_lines__[171] = "pyjamas.ui.UIObject.py, line 171:\n    def setVisible(self, element, visible=None):";
		pyjamas.ui.UIObject.__track_lines__[176] = "pyjamas.ui.UIObject.py, line 176:\n    if visible==None:";
		pyjamas.ui.UIObject.__track_lines__[177] = "pyjamas.ui.UIObject.py, line 177:\n    visible = element";
		pyjamas.ui.UIObject.__track_lines__[178] = "pyjamas.ui.UIObject.py, line 178:\n    element = self.element";
		pyjamas.ui.UIObject.__track_lines__[180] = "pyjamas.ui.UIObject.py, line 180:\n    if visible:";
		pyjamas.ui.UIObject.__track_lines__[181] = "pyjamas.ui.UIObject.py, line 181:\n    element.style.display = \"\"";
		pyjamas.ui.UIObject.__track_lines__[183] = "pyjamas.ui.UIObject.py, line 183:\n    element.style.display = \"none\"";
		pyjamas.ui.UIObject.__track_lines__[185] = "pyjamas.ui.UIObject.py, line 185:\n    def unsinkEvents(self, eventBitsToRemove):";
		pyjamas.ui.UIObject.__track_lines__[187] = "pyjamas.ui.UIObject.py, line 187:\n    DOM.sinkEvents(self.getElement(), ~eventBitsToRemove & DOM.getEventsSunk(self.getElement()))";
	try {
		track.module='pyjamas.ui.UIObject';
		track.lineno=1;
		track.lineno=14;
		modules['pyjamas'] = pyjamas();
		pyjslib.import_module(sys.loadpath, 'pyjamas.ui.UIObject', 'pyjamas', 0, false);
		track.module='pyjamas.ui.UIObject';

		modules['pyjamas'] = pyjamas();
		pyjslib.import_module(sys.loadpath, 'pyjamas.ui.UIObject', 'pyjamas', 0, false);
		track.module='pyjamas.ui.UIObject';

		modules['pyjamas.DOM'] = pyjamas.DOM();
		pyjslib.import_module(sys.loadpath, 'pyjamas.ui.UIObject', 'pyjamas.DOM', 0, false);
		track.module='pyjamas.ui.UIObject';

		pyjamas.ui.UIObject.DOM = pyjamas.DOM;
		track.lineno=15;
		modules['pyjamas'] = pyjamas();
		pyjslib.import_module(sys.loadpath, 'pyjamas.ui.UIObject', 'pyjamas', 0, false);
		track.module='pyjamas.ui.UIObject';

		modules['pyjamas'] = pyjamas();
		pyjslib.import_module(sys.loadpath, 'pyjamas.ui.UIObject', 'pyjamas', 0, false);
		track.module='pyjamas.ui.UIObject';

		modules['pyjamas.Window'] = pyjamas.Window();
		pyjslib.import_module(sys.loadpath, 'pyjamas.ui.UIObject', 'pyjamas.Window', 0, false);
		track.module='pyjamas.ui.UIObject';

		pyjamas.ui.UIObject.Window = pyjamas.Window;
		track.lineno=17;
		pyjamas.ui.UIObject.setStyleName = function(element, style, add) {
			if (pyjs_options.arg_count && arguments.length != 3) pyjs__exception_func_param(arguments.callee.__name__, 3, 3, arguments.length);
			track={module:'pyjamas.ui.UIObject',lineno:17};trackstack.push(track);
			track.module='pyjamas.ui.UIObject';
			track.lineno=17;
			track.lineno=19;
			var oldStyle = pyjamas.ui.UIObject.DOM.getAttribute(element, String('className'));
			track.lineno=20;
			if (pyjslib.bool(pyjslib.eq(oldStyle, null))) {
				track.lineno=21;
				oldStyle = String('');
			}
			track.lineno=22;
			var idx = oldStyle.find(style);
			track.lineno=25;
			var lastPos = pyjslib.len(oldStyle);
			track.lineno=26;
    while (pyjslib.bool((idx != -1))) {
			track.lineno=27;
			if (pyjslib.bool((pyjslib.eq(idx, 0)) || (pyjslib.eq(oldStyle.__getitem__( ( idx - 1 ) ), String(' '))))) {
				track.lineno=28;
				var last =  ( idx + pyjslib.len(style) ) ;
				track.lineno=29;
				if (pyjslib.bool((pyjslib.eq(last, lastPos)) || (((pyjslib.cmp(last, lastPos) == -1)) && (pyjslib.eq(oldStyle.__getitem__(last), String(' ')))))) {
					track.lineno=30;
					break;
				}
			}
			track.lineno=31;
			idx = oldStyle.find(style,  ( idx + 1 ) );
    }
			track.lineno=33;
			if (pyjslib.bool(add)) {
				track.lineno=34;
				if (pyjslib.bool(pyjslib.eq(idx, -1))) {
					track.lineno=35;
					pyjamas.ui.UIObject.DOM.setAttribute(element, String('className'),  (  ( oldStyle + String(' ') )  + style ) );
				}
			}
			else {
				track.lineno=37;
				if (pyjslib.bool((idx != -1))) {
					track.lineno=38;
					var begin = pyjslib.slice(oldStyle, null,  ( idx - 1 ) );
					track.lineno=39;
					var end = pyjslib.slice(oldStyle,  ( idx + pyjslib.len(style) ) , null);
					track.lineno=40;
					pyjamas.ui.UIObject.DOM.setAttribute(element, String('className'),  ( begin + end ) );
				}
			}
			trackstack.pop();track=trackstack.pop();trackstack.push(track);
			return null;
		};
		pyjamas.ui.UIObject.setStyleName.__name__ = 'setStyleName';

		pyjamas.ui.UIObject.setStyleName.parse_kwargs = function ( __kwargs, element, style, add ) {
			if (typeof element == 'undefined') {
				element=__kwargs.element;
				delete __kwargs.element;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.element != 'undefined') {
				pyjs__exception_func_multiple_values('pyjamas.ui.UIObject.setStyleName', 'element');
			}
			if (typeof style == 'undefined') {
				style=__kwargs.style;
				delete __kwargs.style;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.style != 'undefined') {
				pyjs__exception_func_multiple_values('pyjamas.ui.UIObject.setStyleName', 'style');
			}
			if (typeof add == 'undefined') {
				add=__kwargs.add;
				delete __kwargs.add;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.add != 'undefined') {
				pyjs__exception_func_multiple_values('pyjamas.ui.UIObject.setStyleName', 'add');
			}
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('pyjamas.ui.UIObject.setStyleName', i);
				}
			}
			var __r = [element, style, add];
			for (var pyjs__va_arg = 4;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		};
		track.lineno=42;
		pyjamas.ui.UIObject.UIObject = (function(){
			var cls_instance = pyjs__class_instance('UIObject');
			var cls_definition = new Object();
			cls_definition.__md5__ = 'c88bcd10fbc4279c9eefd988dd873a60';
			cls_definition.__init__ = pyjs__bind_method(cls_instance, '__init__', function() {
				if (this.__is_instance__ === true) {
					var self = this;
					var kwargs = arguments.length >= 1 ? arguments[arguments.length-1] : arguments[arguments.length];
					if (pyjs_options.arg_count && (arguments.length < 0 || arguments.length > 1)) pyjs__exception_func_param(arguments.callee.__name__, 1, 2, arguments.length+1);
				} else {
					var self = arguments[0];
					var kwargs = arguments.length >= 2 ? arguments[arguments.length-1] : arguments[arguments.length];
					if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					if (pyjs_options.arg_count && (arguments.length < 1 || arguments.length > 2)) pyjs__exception_func_param(arguments.callee.__name__, 1, 2, arguments.length);
				}
				if (pyjs_options.arg_instance_type) {
					if (self.prototype.__md5__ !== 'c88bcd10fbc4279c9eefd988dd873a60') {
						if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
							pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
						}
					}
				}
				if (typeof kwargs == 'undefined') {
					kwargs = pyjslib.Dict({});
					if (typeof self != 'undefined') {
						if (pyjslib.get_pyjs_classtype(self) == 'Dict') {
							kwargs = self;
							self = arguments[1];
						}
					} else {
					}
				}
				track={module:pyjamas.ui.UIObject, lineno:44};trackstack.push(track);
				track.module='pyjamas.ui.UIObject';
				track.lineno=44;
				track.lineno=48;
				if (pyjslib.bool(kwargs)) {
					track.lineno=49;
					pyjamas.ui.UIObject.Window.alert( ( (self.__name__===undefined?(function(){throw new TypeError('self.__name__ is undefined')})():(typeof self.__name__ == 'function' && self.__is_instance__?pyjslib.getattr(self, '__name__'):self.__name__)) + pyjslib.repr(kwargs) ) );
					track.lineno=50;
					var pyjs__trackstack_size_1=trackstack.length;
					var __prop = kwargs.keys().__iter__();
					try {
						while (true) {
							var prop = __prop.next();
							
							track.lineno=51;
							var fn = pyjslib.getattr(self, pyjslib.sprintf(String('set%s'), prop), null);
							track.lineno=52;
							if (pyjslib.bool(fn)) {
								track.lineno=53;
								fn(keys.__getitem__(prop));
							}
						}
					} catch (e) {
						if (e.__name__ != 'StopIteration') {
							throw e;
						}
					}
					if (trackstack.length > pyjs__trackstack_size_1) {
						trackstack = trackstack.slice(0,pyjs__trackstack_size_1);
						track = trackstack.slice(-1)[0];
					}
					track.module='pyjamas.ui.UIObject';
				}
				trackstack.pop();track=trackstack.pop();trackstack.push(track);
				return null;
			}
			, function ( __kwargs ) {
				var __r = [];
				for (var pyjs__va_arg = 1;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
					__r.push(arguments[pyjs__va_arg]);
				}

				__r.push(pyjslib.Dict(__kwargs));
				return __r;
			});
			cls_definition.getAbsoluteLeft = pyjs__bind_method(cls_instance, 'getAbsoluteLeft', function() {
				if (this.__is_instance__ === true) {
					var self = this;
					if (pyjs_options.arg_count && arguments.length != 0) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length+1);
				} else {
					var self = arguments[0];
					if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length);
				}
				if (pyjs_options.arg_instance_type) {
					if (self.prototype.__md5__ !== 'c88bcd10fbc4279c9eefd988dd873a60') {
						if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
							pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
						}
					}
				}
				track={module:pyjamas.ui.UIObject, lineno:55};trackstack.push(track);
				track.module='pyjamas.ui.UIObject';
				track.lineno=55;
				track.lineno=56;
				track.lineno=56;
				var pyjs__ret = pyjamas.ui.UIObject.DOM.getAbsoluteLeft(self.getElement());
				trackstack.pop();track=trackstack.pop();trackstack.push(track);
				return pyjs__ret;
			}
			, function ( __kwargs ) {
				if (pyjs_options.arg_kwarg_unexpected_keyword) {
					for (var i in __kwargs) {
						pyjs__exception_func_unexpected_keyword('getAbsoluteLeft', i);
					}
				}
				var __r = [];
				for (var pyjs__va_arg = 1;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
					__r.push(arguments[pyjs__va_arg]);
				}

				return __r;
			});
			cls_definition.getAbsoluteTop = pyjs__bind_method(cls_instance, 'getAbsoluteTop', function() {
				if (this.__is_instance__ === true) {
					var self = this;
					if (pyjs_options.arg_count && arguments.length != 0) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length+1);
				} else {
					var self = arguments[0];
					if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length);
				}
				if (pyjs_options.arg_instance_type) {
					if (self.prototype.__md5__ !== 'c88bcd10fbc4279c9eefd988dd873a60') {
						if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
							pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
						}
					}
				}
				track={module:pyjamas.ui.UIObject, lineno:58};trackstack.push(track);
				track.module='pyjamas.ui.UIObject';
				track.lineno=58;
				track.lineno=59;
				track.lineno=59;
				var pyjs__ret = pyjamas.ui.UIObject.DOM.getAbsoluteTop(self.getElement());
				trackstack.pop();track=trackstack.pop();trackstack.push(track);
				return pyjs__ret;
			}
			, function ( __kwargs ) {
				if (pyjs_options.arg_kwarg_unexpected_keyword) {
					for (var i in __kwargs) {
						pyjs__exception_func_unexpected_keyword('getAbsoluteTop', i);
					}
				}
				var __r = [];
				for (var pyjs__va_arg = 1;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
					__r.push(arguments[pyjs__va_arg]);
				}

				return __r;
			});
			cls_definition.getElement = pyjs__bind_method(cls_instance, 'getElement', function() {
				if (this.__is_instance__ === true) {
					var self = this;
					if (pyjs_options.arg_count && arguments.length != 0) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length+1);
				} else {
					var self = arguments[0];
					if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length);
				}
				if (pyjs_options.arg_instance_type) {
					if (self.prototype.__md5__ !== 'c88bcd10fbc4279c9eefd988dd873a60') {
						if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
							pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
						}
					}
				}
				track={module:pyjamas.ui.UIObject, lineno:61};trackstack.push(track);
				track.module='pyjamas.ui.UIObject';
				track.lineno=61;
				track.lineno=63;
				track.lineno=63;
				var pyjs__ret = (self.element===undefined?(function(){throw new TypeError('self.element is undefined')})():(typeof self.element == 'function' && self.__is_instance__?pyjslib.getattr(self, 'element'):self.element));
				trackstack.pop();track=trackstack.pop();trackstack.push(track);
				return pyjs__ret;
			}
			, function ( __kwargs ) {
				if (pyjs_options.arg_kwarg_unexpected_keyword) {
					for (var i in __kwargs) {
						pyjs__exception_func_unexpected_keyword('getElement', i);
					}
				}
				var __r = [];
				for (var pyjs__va_arg = 1;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
					__r.push(arguments[pyjs__va_arg]);
				}

				return __r;
			});
			cls_definition.getOffsetHeight = pyjs__bind_method(cls_instance, 'getOffsetHeight', function() {
				if (this.__is_instance__ === true) {
					var self = this;
					if (pyjs_options.arg_count && arguments.length != 0) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length+1);
				} else {
					var self = arguments[0];
					if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length);
				}
				if (pyjs_options.arg_instance_type) {
					if (self.prototype.__md5__ !== 'c88bcd10fbc4279c9eefd988dd873a60') {
						if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
							pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
						}
					}
				}
				track={module:pyjamas.ui.UIObject, lineno:65};trackstack.push(track);
				track.module='pyjamas.ui.UIObject';
				track.lineno=65;
				track.lineno=66;
				track.lineno=66;
				var pyjs__ret = pyjamas.ui.UIObject.DOM.getIntAttribute((self.element===undefined?(function(){throw new TypeError('self.element is undefined')})():(typeof self.element == 'function' && self.__is_instance__?pyjslib.getattr(self, 'element'):self.element)), String('offsetHeight'));
				trackstack.pop();track=trackstack.pop();trackstack.push(track);
				return pyjs__ret;
			}
			, function ( __kwargs ) {
				if (pyjs_options.arg_kwarg_unexpected_keyword) {
					for (var i in __kwargs) {
						pyjs__exception_func_unexpected_keyword('getOffsetHeight', i);
					}
				}
				var __r = [];
				for (var pyjs__va_arg = 1;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
					__r.push(arguments[pyjs__va_arg]);
				}

				return __r;
			});
			cls_definition.getOffsetWidth = pyjs__bind_method(cls_instance, 'getOffsetWidth', function() {
				if (this.__is_instance__ === true) {
					var self = this;
					if (pyjs_options.arg_count && arguments.length != 0) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length+1);
				} else {
					var self = arguments[0];
					if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length);
				}
				if (pyjs_options.arg_instance_type) {
					if (self.prototype.__md5__ !== 'c88bcd10fbc4279c9eefd988dd873a60') {
						if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
							pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
						}
					}
				}
				track={module:pyjamas.ui.UIObject, lineno:68};trackstack.push(track);
				track.module='pyjamas.ui.UIObject';
				track.lineno=68;
				track.lineno=69;
				track.lineno=69;
				var pyjs__ret = pyjamas.ui.UIObject.DOM.getIntAttribute((self.element===undefined?(function(){throw new TypeError('self.element is undefined')})():(typeof self.element == 'function' && self.__is_instance__?pyjslib.getattr(self, 'element'):self.element)), String('offsetWidth'));
				trackstack.pop();track=trackstack.pop();trackstack.push(track);
				return pyjs__ret;
			}
			, function ( __kwargs ) {
				if (pyjs_options.arg_kwarg_unexpected_keyword) {
					for (var i in __kwargs) {
						pyjs__exception_func_unexpected_keyword('getOffsetWidth', i);
					}
				}
				var __r = [];
				for (var pyjs__va_arg = 1;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
					__r.push(arguments[pyjs__va_arg]);
				}

				return __r;
			});
			cls_definition.getStyleName = pyjs__bind_method(cls_instance, 'getStyleName', function() {
				if (this.__is_instance__ === true) {
					var self = this;
					if (pyjs_options.arg_count && arguments.length != 0) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length+1);
				} else {
					var self = arguments[0];
					if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length);
				}
				if (pyjs_options.arg_instance_type) {
					if (self.prototype.__md5__ !== 'c88bcd10fbc4279c9eefd988dd873a60') {
						if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
							pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
						}
					}
				}
				track={module:pyjamas.ui.UIObject, lineno:71};trackstack.push(track);
				track.module='pyjamas.ui.UIObject';
				track.lineno=71;
				track.lineno=72;
				track.lineno=72;
				var pyjs__ret = pyjamas.ui.UIObject.DOM.getAttribute((self.element===undefined?(function(){throw new TypeError('self.element is undefined')})():(typeof self.element == 'function' && self.__is_instance__?pyjslib.getattr(self, 'element'):self.element)), String('className'));
				trackstack.pop();track=trackstack.pop();trackstack.push(track);
				return pyjs__ret;
			}
			, function ( __kwargs ) {
				if (pyjs_options.arg_kwarg_unexpected_keyword) {
					for (var i in __kwargs) {
						pyjs__exception_func_unexpected_keyword('getStyleName', i);
					}
				}
				var __r = [];
				for (var pyjs__va_arg = 1;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
					__r.push(arguments[pyjs__va_arg]);
				}

				return __r;
			});
			cls_definition.getStylePrimaryName = pyjs__bind_method(cls_instance, 'getStylePrimaryName', function() {
				if (this.__is_instance__ === true) {
					var self = this;
					if (pyjs_options.arg_count && arguments.length != 0) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length+1);
				} else {
					var self = arguments[0];
					if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length);
				}
				if (pyjs_options.arg_instance_type) {
					if (self.prototype.__md5__ !== 'c88bcd10fbc4279c9eefd988dd873a60') {
						if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
							pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
						}
					}
				}
				track={module:pyjamas.ui.UIObject, lineno:74};trackstack.push(track);
				track.module='pyjamas.ui.UIObject';
				track.lineno=74;
				track.lineno=76;
				var fullClassName = self.getStyleName();
				track.lineno=77;
				if (pyjslib.bool(fullClassName)) {
					track.lineno=77;
					track.lineno=77;
					var pyjs__ret = fullClassName.split().__getitem__(0);
					trackstack.pop();track=trackstack.pop();trackstack.push(track);
					return pyjs__ret;
				}
				trackstack.pop();track=trackstack.pop();trackstack.push(track);
				return null;
			}
			, function ( __kwargs ) {
				if (pyjs_options.arg_kwarg_unexpected_keyword) {
					for (var i in __kwargs) {
						pyjs__exception_func_unexpected_keyword('getStylePrimaryName', i);
					}
				}
				var __r = [];
				for (var pyjs__va_arg = 1;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
					__r.push(arguments[pyjs__va_arg]);
				}

				return __r;
			});
			cls_definition.getTitle = pyjs__bind_method(cls_instance, 'getTitle', function() {
				if (this.__is_instance__ === true) {
					var self = this;
					if (pyjs_options.arg_count && arguments.length != 0) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length+1);
				} else {
					var self = arguments[0];
					if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length);
				}
				if (pyjs_options.arg_instance_type) {
					if (self.prototype.__md5__ !== 'c88bcd10fbc4279c9eefd988dd873a60') {
						if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
							pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
						}
					}
				}
				track={module:pyjamas.ui.UIObject, lineno:79};trackstack.push(track);
				track.module='pyjamas.ui.UIObject';
				track.lineno=79;
				track.lineno=80;
				track.lineno=80;
				var pyjs__ret = pyjamas.ui.UIObject.DOM.getAttribute((self.element===undefined?(function(){throw new TypeError('self.element is undefined')})():(typeof self.element == 'function' && self.__is_instance__?pyjslib.getattr(self, 'element'):self.element)), String('title'));
				trackstack.pop();track=trackstack.pop();trackstack.push(track);
				return pyjs__ret;
			}
			, function ( __kwargs ) {
				if (pyjs_options.arg_kwarg_unexpected_keyword) {
					for (var i in __kwargs) {
						pyjs__exception_func_unexpected_keyword('getTitle', i);
					}
				}
				var __r = [];
				for (var pyjs__va_arg = 1;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
					__r.push(arguments[pyjs__va_arg]);
				}

				return __r;
			});
			cls_definition.setElement = pyjs__bind_method(cls_instance, 'setElement', function(element) {
				if (this.__is_instance__ === true) {
					var self = this;
					if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 2, 2, arguments.length+1);
				} else {
					var self = arguments[0];
					element = arguments[1];
					if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					if (pyjs_options.arg_count && arguments.length != 2) pyjs__exception_func_param(arguments.callee.__name__, 2, 2, arguments.length);
				}
				if (pyjs_options.arg_instance_type) {
					if (self.prototype.__md5__ !== 'c88bcd10fbc4279c9eefd988dd873a60') {
						if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
							pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
						}
					}
				}
				track={module:pyjamas.ui.UIObject, lineno:82};trackstack.push(track);
				track.module='pyjamas.ui.UIObject';
				track.lineno=82;
				track.lineno=84;
				self.element = element;
				trackstack.pop();track=trackstack.pop();trackstack.push(track);
				return null;
			}
			, function ( __kwargs, element ) {
				if (typeof element == 'undefined') {
					element=__kwargs.element;
					delete __kwargs.element;
				} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.element != 'undefined') {
					pyjs__exception_func_multiple_values('setElement', 'element');
				}
				if (pyjs_options.arg_kwarg_unexpected_keyword) {
					for (var i in __kwargs) {
						pyjs__exception_func_unexpected_keyword('setElement', i);
					}
				}
				var __r = [element];
				for (var pyjs__va_arg = 2;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
					__r.push(arguments[pyjs__va_arg]);
				}

				return __r;
			});
			cls_definition.setHeight = pyjs__bind_method(cls_instance, 'setHeight', function(height) {
				if (this.__is_instance__ === true) {
					var self = this;
					if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 2, 2, arguments.length+1);
				} else {
					var self = arguments[0];
					height = arguments[1];
					if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					if (pyjs_options.arg_count && arguments.length != 2) pyjs__exception_func_param(arguments.callee.__name__, 2, 2, arguments.length);
				}
				if (pyjs_options.arg_instance_type) {
					if (self.prototype.__md5__ !== 'c88bcd10fbc4279c9eefd988dd873a60') {
						if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
							pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
						}
					}
				}
				track={module:pyjamas.ui.UIObject, lineno:86};trackstack.push(track);
				track.module='pyjamas.ui.UIObject';
				track.lineno=86;
				track.lineno=89;
				pyjamas.ui.UIObject.DOM.setStyleAttribute((self.element===undefined?(function(){throw new TypeError('self.element is undefined')})():(typeof self.element == 'function' && self.__is_instance__?pyjslib.getattr(self, 'element'):self.element)), String('height'), height);
				trackstack.pop();track=trackstack.pop();trackstack.push(track);
				return null;
			}
			, function ( __kwargs, height ) {
				if (typeof height == 'undefined') {
					height=__kwargs.height;
					delete __kwargs.height;
				} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.height != 'undefined') {
					pyjs__exception_func_multiple_values('setHeight', 'height');
				}
				if (pyjs_options.arg_kwarg_unexpected_keyword) {
					for (var i in __kwargs) {
						pyjs__exception_func_unexpected_keyword('setHeight', i);
					}
				}
				var __r = [height];
				for (var pyjs__va_arg = 2;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
					__r.push(arguments[pyjs__va_arg]);
				}

				return __r;
			});
			cls_definition.getHeight = pyjs__bind_method(cls_instance, 'getHeight', function() {
				if (this.__is_instance__ === true) {
					var self = this;
					if (pyjs_options.arg_count && arguments.length != 0) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length+1);
				} else {
					var self = arguments[0];
					if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length);
				}
				if (pyjs_options.arg_instance_type) {
					if (self.prototype.__md5__ !== 'c88bcd10fbc4279c9eefd988dd873a60') {
						if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
							pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
						}
					}
				}
				track={module:pyjamas.ui.UIObject, lineno:91};trackstack.push(track);
				track.module='pyjamas.ui.UIObject';
				track.lineno=91;
				track.lineno=92;
				track.lineno=92;
				var pyjs__ret = pyjamas.ui.UIObject.DOM.getStyleAttribute((self.element===undefined?(function(){throw new TypeError('self.element is undefined')})():(typeof self.element == 'function' && self.__is_instance__?pyjslib.getattr(self, 'element'):self.element)), String('height'));
				trackstack.pop();track=trackstack.pop();trackstack.push(track);
				return pyjs__ret;
			}
			, function ( __kwargs ) {
				if (pyjs_options.arg_kwarg_unexpected_keyword) {
					for (var i in __kwargs) {
						pyjs__exception_func_unexpected_keyword('getHeight', i);
					}
				}
				var __r = [];
				for (var pyjs__va_arg = 1;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
					__r.push(arguments[pyjs__va_arg]);
				}

				return __r;
			});
			cls_definition.setPixelSize = pyjs__bind_method(cls_instance, 'setPixelSize', function(width, height) {
				if (this.__is_instance__ === true) {
					var self = this;
					if (pyjs_options.arg_count && arguments.length != 2) pyjs__exception_func_param(arguments.callee.__name__, 3, 3, arguments.length+1);
				} else {
					var self = arguments[0];
					width = arguments[1];
					height = arguments[2];
					if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					if (pyjs_options.arg_count && arguments.length != 3) pyjs__exception_func_param(arguments.callee.__name__, 3, 3, arguments.length);
				}
				if (pyjs_options.arg_instance_type) {
					if (self.prototype.__md5__ !== 'c88bcd10fbc4279c9eefd988dd873a60') {
						if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
							pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
						}
					}
				}
				track={module:pyjamas.ui.UIObject, lineno:94};trackstack.push(track);
				track.module='pyjamas.ui.UIObject';
				track.lineno=94;
				track.lineno=97;
				if (pyjslib.bool((pyjslib.cmp(width, 0) != -1))) {
					track.lineno=98;
					self.setWidth( ( width + String('px') ) );
				}
				track.lineno=99;
				if (pyjslib.bool((pyjslib.cmp(height, 0) != -1))) {
					track.lineno=100;
					self.setHeight( ( height + String('px') ) );
				}
				trackstack.pop();track=trackstack.pop();trackstack.push(track);
				return null;
			}
			, function ( __kwargs, width, height ) {
				if (typeof width == 'undefined') {
					width=__kwargs.width;
					delete __kwargs.width;
				} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.width != 'undefined') {
					pyjs__exception_func_multiple_values('setPixelSize', 'width');
				}
				if (typeof height == 'undefined') {
					height=__kwargs.height;
					delete __kwargs.height;
				} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.height != 'undefined') {
					pyjs__exception_func_multiple_values('setPixelSize', 'height');
				}
				if (pyjs_options.arg_kwarg_unexpected_keyword) {
					for (var i in __kwargs) {
						pyjs__exception_func_unexpected_keyword('setPixelSize', i);
					}
				}
				var __r = [width, height];
				for (var pyjs__va_arg = 3;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
					__r.push(arguments[pyjs__va_arg]);
				}

				return __r;
			});
			cls_definition.setSize = pyjs__bind_method(cls_instance, 'setSize', function(width, height) {
				if (this.__is_instance__ === true) {
					var self = this;
					if (pyjs_options.arg_count && arguments.length != 2) pyjs__exception_func_param(arguments.callee.__name__, 3, 3, arguments.length+1);
				} else {
					var self = arguments[0];
					width = arguments[1];
					height = arguments[2];
					if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					if (pyjs_options.arg_count && arguments.length != 3) pyjs__exception_func_param(arguments.callee.__name__, 3, 3, arguments.length);
				}
				if (pyjs_options.arg_instance_type) {
					if (self.prototype.__md5__ !== 'c88bcd10fbc4279c9eefd988dd873a60') {
						if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
							pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
						}
					}
				}
				track={module:pyjamas.ui.UIObject, lineno:102};trackstack.push(track);
				track.module='pyjamas.ui.UIObject';
				track.lineno=102;
				track.lineno=105;
				self.setWidth(width);
				track.lineno=106;
				self.setHeight(height);
				trackstack.pop();track=trackstack.pop();trackstack.push(track);
				return null;
			}
			, function ( __kwargs, width, height ) {
				if (typeof width == 'undefined') {
					width=__kwargs.width;
					delete __kwargs.width;
				} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.width != 'undefined') {
					pyjs__exception_func_multiple_values('setSize', 'width');
				}
				if (typeof height == 'undefined') {
					height=__kwargs.height;
					delete __kwargs.height;
				} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.height != 'undefined') {
					pyjs__exception_func_multiple_values('setSize', 'height');
				}
				if (pyjs_options.arg_kwarg_unexpected_keyword) {
					for (var i in __kwargs) {
						pyjs__exception_func_unexpected_keyword('setSize', i);
					}
				}
				var __r = [width, height];
				for (var pyjs__va_arg = 3;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
					__r.push(arguments[pyjs__va_arg]);
				}

				return __r;
			});
			cls_definition.addStyleName = pyjs__bind_method(cls_instance, 'addStyleName', function(style) {
				if (this.__is_instance__ === true) {
					var self = this;
					if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 2, 2, arguments.length+1);
				} else {
					var self = arguments[0];
					style = arguments[1];
					if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					if (pyjs_options.arg_count && arguments.length != 2) pyjs__exception_func_param(arguments.callee.__name__, 2, 2, arguments.length);
				}
				if (pyjs_options.arg_instance_type) {
					if (self.prototype.__md5__ !== 'c88bcd10fbc4279c9eefd988dd873a60') {
						if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
							pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
						}
					}
				}
				track={module:pyjamas.ui.UIObject, lineno:108};trackstack.push(track);
				track.module='pyjamas.ui.UIObject';
				track.lineno=108;
				track.lineno=112;
				self.setStyleName((self.element===undefined?(function(){throw new TypeError('self.element is undefined')})():(typeof self.element == 'function' && self.__is_instance__?pyjslib.getattr(self, 'element'):self.element)), style, true);
				trackstack.pop();track=trackstack.pop();trackstack.push(track);
				return null;
			}
			, function ( __kwargs, style ) {
				if (typeof style == 'undefined') {
					style=__kwargs.style;
					delete __kwargs.style;
				} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.style != 'undefined') {
					pyjs__exception_func_multiple_values('addStyleName', 'style');
				}
				if (pyjs_options.arg_kwarg_unexpected_keyword) {
					for (var i in __kwargs) {
						pyjs__exception_func_unexpected_keyword('addStyleName', i);
					}
				}
				var __r = [style];
				for (var pyjs__va_arg = 2;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
					__r.push(arguments[pyjs__va_arg]);
				}

				return __r;
			});
			cls_definition.addStyleDependentName = pyjs__bind_method(cls_instance, 'addStyleDependentName', function(styleSuffix) {
				if (this.__is_instance__ === true) {
					var self = this;
					if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 2, 2, arguments.length+1);
				} else {
					var self = arguments[0];
					styleSuffix = arguments[1];
					if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					if (pyjs_options.arg_count && arguments.length != 2) pyjs__exception_func_param(arguments.callee.__name__, 2, 2, arguments.length);
				}
				if (pyjs_options.arg_instance_type) {
					if (self.prototype.__md5__ !== 'c88bcd10fbc4279c9eefd988dd873a60') {
						if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
							pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
						}
					}
				}
				track={module:pyjamas.ui.UIObject, lineno:114};trackstack.push(track);
				track.module='pyjamas.ui.UIObject';
				track.lineno=114;
				track.lineno=118;
				self.addStyleName( (  ( self.getStylePrimaryName() + String('-') )  + styleSuffix ) );
				trackstack.pop();track=trackstack.pop();trackstack.push(track);
				return null;
			}
			, function ( __kwargs, styleSuffix ) {
				if (typeof styleSuffix == 'undefined') {
					styleSuffix=__kwargs.styleSuffix;
					delete __kwargs.styleSuffix;
				} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.styleSuffix != 'undefined') {
					pyjs__exception_func_multiple_values('addStyleDependentName', 'styleSuffix');
				}
				if (pyjs_options.arg_kwarg_unexpected_keyword) {
					for (var i in __kwargs) {
						pyjs__exception_func_unexpected_keyword('addStyleDependentName', i);
					}
				}
				var __r = [styleSuffix];
				for (var pyjs__va_arg = 2;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
					__r.push(arguments[pyjs__va_arg]);
				}

				return __r;
			});
			cls_definition.removeStyleName = pyjs__bind_method(cls_instance, 'removeStyleName', function(style) {
				if (this.__is_instance__ === true) {
					var self = this;
					if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 2, 2, arguments.length+1);
				} else {
					var self = arguments[0];
					style = arguments[1];
					if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					if (pyjs_options.arg_count && arguments.length != 2) pyjs__exception_func_param(arguments.callee.__name__, 2, 2, arguments.length);
				}
				if (pyjs_options.arg_instance_type) {
					if (self.prototype.__md5__ !== 'c88bcd10fbc4279c9eefd988dd873a60') {
						if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
							pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
						}
					}
				}
				track={module:pyjamas.ui.UIObject, lineno:120};trackstack.push(track);
				track.module='pyjamas.ui.UIObject';
				track.lineno=120;
				track.lineno=123;
				self.setStyleName((self.element===undefined?(function(){throw new TypeError('self.element is undefined')})():(typeof self.element == 'function' && self.__is_instance__?pyjslib.getattr(self, 'element'):self.element)), style, false);
				trackstack.pop();track=trackstack.pop();trackstack.push(track);
				return null;
			}
			, function ( __kwargs, style ) {
				if (typeof style == 'undefined') {
					style=__kwargs.style;
					delete __kwargs.style;
				} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.style != 'undefined') {
					pyjs__exception_func_multiple_values('removeStyleName', 'style');
				}
				if (pyjs_options.arg_kwarg_unexpected_keyword) {
					for (var i in __kwargs) {
						pyjs__exception_func_unexpected_keyword('removeStyleName', i);
					}
				}
				var __r = [style];
				for (var pyjs__va_arg = 2;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
					__r.push(arguments[pyjs__va_arg]);
				}

				return __r;
			});
			cls_definition.removeStyleDependentName = pyjs__bind_method(cls_instance, 'removeStyleDependentName', function(styleSuffix) {
				if (this.__is_instance__ === true) {
					var self = this;
					if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 2, 2, arguments.length+1);
				} else {
					var self = arguments[0];
					styleSuffix = arguments[1];
					if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					if (pyjs_options.arg_count && arguments.length != 2) pyjs__exception_func_param(arguments.callee.__name__, 2, 2, arguments.length);
				}
				if (pyjs_options.arg_instance_type) {
					if (self.prototype.__md5__ !== 'c88bcd10fbc4279c9eefd988dd873a60') {
						if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
							pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
						}
					}
				}
				track={module:pyjamas.ui.UIObject, lineno:125};trackstack.push(track);
				track.module='pyjamas.ui.UIObject';
				track.lineno=125;
				track.lineno=127;
				self.removeStyleName( (  ( self.getStylePrimaryName() + String('-') )  + styleSuffix ) );
				trackstack.pop();track=trackstack.pop();trackstack.push(track);
				return null;
			}
			, function ( __kwargs, styleSuffix ) {
				if (typeof styleSuffix == 'undefined') {
					styleSuffix=__kwargs.styleSuffix;
					delete __kwargs.styleSuffix;
				} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.styleSuffix != 'undefined') {
					pyjs__exception_func_multiple_values('removeStyleDependentName', 'styleSuffix');
				}
				if (pyjs_options.arg_kwarg_unexpected_keyword) {
					for (var i in __kwargs) {
						pyjs__exception_func_unexpected_keyword('removeStyleDependentName', i);
					}
				}
				var __r = [styleSuffix];
				for (var pyjs__va_arg = 2;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
					__r.push(arguments[pyjs__va_arg]);
				}

				return __r;
			});
			cls_definition.setStyleName = pyjs__bind_method(cls_instance, 'setStyleName', function(element, style, add) {
				if (this.__is_instance__ === true) {
					var self = this;
					if (pyjs_options.arg_count && (arguments.length < 1 || arguments.length > 3)) pyjs__exception_func_param(arguments.callee.__name__, 2, 4, arguments.length+1);
				} else {
					var self = arguments[0];
					element = arguments[1];
					style = arguments[2];
					add = arguments[3];
					if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					if (pyjs_options.arg_count && (arguments.length < 2 || arguments.length > 4)) pyjs__exception_func_param(arguments.callee.__name__, 2, 4, arguments.length);
				}
				if (pyjs_options.arg_instance_type) {
					if (self.prototype.__md5__ !== 'c88bcd10fbc4279c9eefd988dd873a60') {
						if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
							pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
						}
					}
				}
				if (typeof style == 'undefined') style=null;
				if (typeof add == 'undefined') add=true;
				track={module:pyjamas.ui.UIObject, lineno:130};trackstack.push(track);
				track.module='pyjamas.ui.UIObject';
				track.lineno=130;
				track.lineno=135;
				if (pyjslib.bool(pyjslib.eq(style, null))) {
					track.lineno=136;
					style = element;
					track.lineno=137;
					pyjamas.ui.UIObject.DOM.setAttribute((self.element===undefined?(function(){throw new TypeError('self.element is undefined')})():(typeof self.element == 'function' && self.__is_instance__?pyjslib.getattr(self, 'element'):self.element)), String('className'), style);
					track.lineno=138;
					track.lineno=138;
					var pyjs__ret = null;
					trackstack.pop();track=trackstack.pop();trackstack.push(track);
					return pyjs__ret;
				}
				track.lineno=139;
				pyjamas.ui.UIObject.setStyleName(element, style, add);
				trackstack.pop();track=trackstack.pop();trackstack.push(track);
				return null;
			}
			, function ( __kwargs, element, style, add ) {
				if (typeof element == 'undefined') {
					element=__kwargs.element;
					delete __kwargs.element;
				} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.element != 'undefined') {
					pyjs__exception_func_multiple_values('setStyleName', 'element');
				}
				if (typeof style == 'undefined') {
					style=__kwargs.style;
					delete __kwargs.style;
				} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.style != 'undefined') {
					pyjs__exception_func_multiple_values('setStyleName', 'style');
				}
				if (typeof add == 'undefined') {
					add=__kwargs.add;
					delete __kwargs.add;
				} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.add != 'undefined') {
					pyjs__exception_func_multiple_values('setStyleName', 'add');
				}
				if (pyjs_options.arg_kwarg_unexpected_keyword) {
					for (var i in __kwargs) {
						pyjs__exception_func_unexpected_keyword('setStyleName', i);
					}
				}
				var __r = [element, style, add];
				for (var pyjs__va_arg = 4;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
					__r.push(arguments[pyjs__va_arg]);
				}

				return __r;
			});
			cls_definition.setTitle = pyjs__bind_method(cls_instance, 'setTitle', function(title) {
				if (this.__is_instance__ === true) {
					var self = this;
					if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 2, 2, arguments.length+1);
				} else {
					var self = arguments[0];
					title = arguments[1];
					if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					if (pyjs_options.arg_count && arguments.length != 2) pyjs__exception_func_param(arguments.callee.__name__, 2, 2, arguments.length);
				}
				if (pyjs_options.arg_instance_type) {
					if (self.prototype.__md5__ !== 'c88bcd10fbc4279c9eefd988dd873a60') {
						if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
							pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
						}
					}
				}
				track={module:pyjamas.ui.UIObject, lineno:141};trackstack.push(track);
				track.module='pyjamas.ui.UIObject';
				track.lineno=141;
				track.lineno=142;
				pyjamas.ui.UIObject.DOM.setAttribute((self.element===undefined?(function(){throw new TypeError('self.element is undefined')})():(typeof self.element == 'function' && self.__is_instance__?pyjslib.getattr(self, 'element'):self.element)), String('title'), title);
				trackstack.pop();track=trackstack.pop();trackstack.push(track);
				return null;
			}
			, function ( __kwargs, title ) {
				if (typeof title == 'undefined') {
					title=__kwargs.title;
					delete __kwargs.title;
				} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.title != 'undefined') {
					pyjs__exception_func_multiple_values('setTitle', 'title');
				}
				if (pyjs_options.arg_kwarg_unexpected_keyword) {
					for (var i in __kwargs) {
						pyjs__exception_func_unexpected_keyword('setTitle', i);
					}
				}
				var __r = [title];
				for (var pyjs__va_arg = 2;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
					__r.push(arguments[pyjs__va_arg]);
				}

				return __r;
			});
			cls_definition.setWidth = pyjs__bind_method(cls_instance, 'setWidth', function(width) {
				if (this.__is_instance__ === true) {
					var self = this;
					if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 2, 2, arguments.length+1);
				} else {
					var self = arguments[0];
					width = arguments[1];
					if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					if (pyjs_options.arg_count && arguments.length != 2) pyjs__exception_func_param(arguments.callee.__name__, 2, 2, arguments.length);
				}
				if (pyjs_options.arg_instance_type) {
					if (self.prototype.__md5__ !== 'c88bcd10fbc4279c9eefd988dd873a60') {
						if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
							pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
						}
					}
				}
				track={module:pyjamas.ui.UIObject, lineno:144};trackstack.push(track);
				track.module='pyjamas.ui.UIObject';
				track.lineno=144;
				track.lineno=147;
				pyjamas.ui.UIObject.DOM.setStyleAttribute((self.element===undefined?(function(){throw new TypeError('self.element is undefined')})():(typeof self.element == 'function' && self.__is_instance__?pyjslib.getattr(self, 'element'):self.element)), String('width'), width);
				trackstack.pop();track=trackstack.pop();trackstack.push(track);
				return null;
			}
			, function ( __kwargs, width ) {
				if (typeof width == 'undefined') {
					width=__kwargs.width;
					delete __kwargs.width;
				} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.width != 'undefined') {
					pyjs__exception_func_multiple_values('setWidth', 'width');
				}
				if (pyjs_options.arg_kwarg_unexpected_keyword) {
					for (var i in __kwargs) {
						pyjs__exception_func_unexpected_keyword('setWidth', i);
					}
				}
				var __r = [width];
				for (var pyjs__va_arg = 2;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
					__r.push(arguments[pyjs__va_arg]);
				}

				return __r;
			});
			cls_definition.getWidth = pyjs__bind_method(cls_instance, 'getWidth', function() {
				if (this.__is_instance__ === true) {
					var self = this;
					if (pyjs_options.arg_count && arguments.length != 0) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length+1);
				} else {
					var self = arguments[0];
					if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length);
				}
				if (pyjs_options.arg_instance_type) {
					if (self.prototype.__md5__ !== 'c88bcd10fbc4279c9eefd988dd873a60') {
						if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
							pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
						}
					}
				}
				track={module:pyjamas.ui.UIObject, lineno:149};trackstack.push(track);
				track.module='pyjamas.ui.UIObject';
				track.lineno=149;
				track.lineno=150;
				track.lineno=150;
				var pyjs__ret = pyjamas.ui.UIObject.DOM.getStyleAttribute((self.element===undefined?(function(){throw new TypeError('self.element is undefined')})():(typeof self.element == 'function' && self.__is_instance__?pyjslib.getattr(self, 'element'):self.element)), String('width'));
				trackstack.pop();track=trackstack.pop();trackstack.push(track);
				return pyjs__ret;
			}
			, function ( __kwargs ) {
				if (pyjs_options.arg_kwarg_unexpected_keyword) {
					for (var i in __kwargs) {
						pyjs__exception_func_unexpected_keyword('getWidth', i);
					}
				}
				var __r = [];
				for (var pyjs__va_arg = 1;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
					__r.push(arguments[pyjs__va_arg]);
				}

				return __r;
			});
			cls_definition.sinkEvents = pyjs__bind_method(cls_instance, 'sinkEvents', function(eventBitsToAdd) {
				if (this.__is_instance__ === true) {
					var self = this;
					if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 2, 2, arguments.length+1);
				} else {
					var self = arguments[0];
					eventBitsToAdd = arguments[1];
					if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					if (pyjs_options.arg_count && arguments.length != 2) pyjs__exception_func_param(arguments.callee.__name__, 2, 2, arguments.length);
				}
				if (pyjs_options.arg_instance_type) {
					if (self.prototype.__md5__ !== 'c88bcd10fbc4279c9eefd988dd873a60') {
						if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
							pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
						}
					}
				}
				track={module:pyjamas.ui.UIObject, lineno:152};trackstack.push(track);
				track.module='pyjamas.ui.UIObject';
				track.lineno=152;
				track.lineno=157;
				if (pyjslib.bool((self.element===undefined?(function(){throw new TypeError('self.element is undefined')})():(typeof self.element == 'function' && self.__is_instance__?pyjslib.getattr(self, 'element'):self.element)))) {
					track.lineno=158;
					pyjamas.ui.UIObject.DOM.sinkEvents(self.getElement(), (eventBitsToAdd | pyjamas.ui.UIObject.DOM.getEventsSunk(self.getElement())));
				}
				trackstack.pop();track=trackstack.pop();trackstack.push(track);
				return null;
			}
			, function ( __kwargs, eventBitsToAdd ) {
				if (typeof eventBitsToAdd == 'undefined') {
					eventBitsToAdd=__kwargs.eventBitsToAdd;
					delete __kwargs.eventBitsToAdd;
				} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.eventBitsToAdd != 'undefined') {
					pyjs__exception_func_multiple_values('sinkEvents', 'eventBitsToAdd');
				}
				if (pyjs_options.arg_kwarg_unexpected_keyword) {
					for (var i in __kwargs) {
						pyjs__exception_func_unexpected_keyword('sinkEvents', i);
					}
				}
				var __r = [eventBitsToAdd];
				for (var pyjs__va_arg = 2;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
					__r.push(arguments[pyjs__va_arg]);
				}

				return __r;
			});
			cls_definition.setzIndex = pyjs__bind_method(cls_instance, 'setzIndex', function(index) {
				if (this.__is_instance__ === true) {
					var self = this;
					if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 2, 2, arguments.length+1);
				} else {
					var self = arguments[0];
					index = arguments[1];
					if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					if (pyjs_options.arg_count && arguments.length != 2) pyjs__exception_func_param(arguments.callee.__name__, 2, 2, arguments.length);
				}
				if (pyjs_options.arg_instance_type) {
					if (self.prototype.__md5__ !== 'c88bcd10fbc4279c9eefd988dd873a60') {
						if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
							pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
						}
					}
				}
				track={module:pyjamas.ui.UIObject, lineno:160};trackstack.push(track);
				track.module='pyjamas.ui.UIObject';
				track.lineno=160;
				track.lineno=161;
				pyjamas.ui.UIObject.DOM.setIntStyleAttribute((self.element===undefined?(function(){throw new TypeError('self.element is undefined')})():(typeof self.element == 'function' && self.__is_instance__?pyjslib.getattr(self, 'element'):self.element)), String('zIndex'), index);
				trackstack.pop();track=trackstack.pop();trackstack.push(track);
				return null;
			}
			, function ( __kwargs, index ) {
				if (typeof index == 'undefined') {
					index=__kwargs.index;
					delete __kwargs.index;
				} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.index != 'undefined') {
					pyjs__exception_func_multiple_values('setzIndex', 'index');
				}
				if (pyjs_options.arg_kwarg_unexpected_keyword) {
					for (var i in __kwargs) {
						pyjs__exception_func_unexpected_keyword('setzIndex', i);
					}
				}
				var __r = [index];
				for (var pyjs__va_arg = 2;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
					__r.push(arguments[pyjs__va_arg]);
				}

				return __r;
			});
			cls_definition.isVisible = pyjs__bind_method(cls_instance, 'isVisible', function(element) {
				if (this.__is_instance__ === true) {
					var self = this;
					if (pyjs_options.arg_count && (arguments.length < 0 || arguments.length > 1)) pyjs__exception_func_param(arguments.callee.__name__, 1, 2, arguments.length+1);
				} else {
					var self = arguments[0];
					element = arguments[1];
					if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					if (pyjs_options.arg_count && (arguments.length < 1 || arguments.length > 2)) pyjs__exception_func_param(arguments.callee.__name__, 1, 2, arguments.length);
				}
				if (pyjs_options.arg_instance_type) {
					if (self.prototype.__md5__ !== 'c88bcd10fbc4279c9eefd988dd873a60') {
						if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
							pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
						}
					}
				}
				if (typeof element == 'undefined') element=null;
				track={module:pyjamas.ui.UIObject, lineno:163};trackstack.push(track);
				track.module='pyjamas.ui.UIObject';
				track.lineno=163;
				track.lineno=166;
				if (pyjslib.bool(!(element))) {
					track.lineno=167;
					element = (self.element===undefined?(function(){throw new TypeError('self.element is undefined')})():(typeof self.element == 'function' && self.__is_instance__?pyjslib.getattr(self, 'element'):self.element));
				}
				track.lineno=168;
				track.lineno=168;
				var pyjs__ret = ((element.style.display===undefined?(function(){throw new TypeError('element.style.display is undefined')})():(typeof element.style.display == 'function' && element.style.__is_instance__?pyjslib.getattr(element.style, 'display'):element.style.display)) != String('none'));
				trackstack.pop();track=trackstack.pop();trackstack.push(track);
				return pyjs__ret;
			}
			, function ( __kwargs, element ) {
				if (typeof element == 'undefined') {
					element=__kwargs.element;
					delete __kwargs.element;
				} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.element != 'undefined') {
					pyjs__exception_func_multiple_values('isVisible', 'element');
				}
				if (pyjs_options.arg_kwarg_unexpected_keyword) {
					for (var i in __kwargs) {
						pyjs__exception_func_unexpected_keyword('isVisible', i);
					}
				}
				var __r = [element];
				for (var pyjs__va_arg = 2;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
					__r.push(arguments[pyjs__va_arg]);
				}

				return __r;
			});
			cls_definition.setVisible = pyjs__bind_method(cls_instance, 'setVisible', function(element, visible) {
				if (this.__is_instance__ === true) {
					var self = this;
					if (pyjs_options.arg_count && (arguments.length < 1 || arguments.length > 2)) pyjs__exception_func_param(arguments.callee.__name__, 2, 3, arguments.length+1);
				} else {
					var self = arguments[0];
					element = arguments[1];
					visible = arguments[2];
					if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					if (pyjs_options.arg_count && (arguments.length < 2 || arguments.length > 3)) pyjs__exception_func_param(arguments.callee.__name__, 2, 3, arguments.length);
				}
				if (pyjs_options.arg_instance_type) {
					if (self.prototype.__md5__ !== 'c88bcd10fbc4279c9eefd988dd873a60') {
						if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
							pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
						}
					}
				}
				if (typeof visible == 'undefined') visible=null;
				track={module:pyjamas.ui.UIObject, lineno:171};trackstack.push(track);
				track.module='pyjamas.ui.UIObject';
				track.lineno=171;
				track.lineno=176;
				if (pyjslib.bool(pyjslib.eq(visible, null))) {
					track.lineno=177;
					visible = element;
					track.lineno=178;
					element = (self.element===undefined?(function(){throw new TypeError('self.element is undefined')})():(typeof self.element == 'function' && self.__is_instance__?pyjslib.getattr(self, 'element'):self.element));
				}
				track.lineno=180;
				if (pyjslib.bool(visible)) {
					track.lineno=181;
					element.style.display = String('');
				}
				else {
					track.lineno=183;
					element.style.display = String('none');
				}
				trackstack.pop();track=trackstack.pop();trackstack.push(track);
				return null;
			}
			, function ( __kwargs, element, visible ) {
				if (typeof element == 'undefined') {
					element=__kwargs.element;
					delete __kwargs.element;
				} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.element != 'undefined') {
					pyjs__exception_func_multiple_values('setVisible', 'element');
				}
				if (typeof visible == 'undefined') {
					visible=__kwargs.visible;
					delete __kwargs.visible;
				} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.visible != 'undefined') {
					pyjs__exception_func_multiple_values('setVisible', 'visible');
				}
				if (pyjs_options.arg_kwarg_unexpected_keyword) {
					for (var i in __kwargs) {
						pyjs__exception_func_unexpected_keyword('setVisible', i);
					}
				}
				var __r = [element, visible];
				for (var pyjs__va_arg = 3;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
					__r.push(arguments[pyjs__va_arg]);
				}

				return __r;
			});
			cls_definition.unsinkEvents = pyjs__bind_method(cls_instance, 'unsinkEvents', function(eventBitsToRemove) {
				if (this.__is_instance__ === true) {
					var self = this;
					if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 2, 2, arguments.length+1);
				} else {
					var self = arguments[0];
					eventBitsToRemove = arguments[1];
					if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					if (pyjs_options.arg_count && arguments.length != 2) pyjs__exception_func_param(arguments.callee.__name__, 2, 2, arguments.length);
				}
				if (pyjs_options.arg_instance_type) {
					if (self.prototype.__md5__ !== 'c88bcd10fbc4279c9eefd988dd873a60') {
						if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
							pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
						}
					}
				}
				track={module:pyjamas.ui.UIObject, lineno:185};trackstack.push(track);
				track.module='pyjamas.ui.UIObject';
				track.lineno=185;
				track.lineno=187;
				pyjamas.ui.UIObject.DOM.sinkEvents(self.getElement(), (~eventBitsToRemove & pyjamas.ui.UIObject.DOM.getEventsSunk(self.getElement())));
				trackstack.pop();track=trackstack.pop();trackstack.push(track);
				return null;
			}
			, function ( __kwargs, eventBitsToRemove ) {
				if (typeof eventBitsToRemove == 'undefined') {
					eventBitsToRemove=__kwargs.eventBitsToRemove;
					delete __kwargs.eventBitsToRemove;
				} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.eventBitsToRemove != 'undefined') {
					pyjs__exception_func_multiple_values('unsinkEvents', 'eventBitsToRemove');
				}
				if (pyjs_options.arg_kwarg_unexpected_keyword) {
					for (var i in __kwargs) {
						pyjs__exception_func_unexpected_keyword('unsinkEvents', i);
					}
				}
				var __r = [eventBitsToRemove];
				for (var pyjs__va_arg = 2;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
					__r.push(arguments[pyjs__va_arg]);
				}

				return __r;
			});
			return pyjs__class_function(cls_instance, cls_definition, 
			                            new Array(pyjslib.object));
		})();

	} catch (pyjs_attr_err) {throw pyjslib._errorMapping(pyjs_attr_err)};
return this;
}; /* end pyjamas.ui.UIObject */ 




pyjamas.ui.UIObject_loaded_fn = function() {
}

pyjamas.ui.UIObject_prepare_mod = function() {
    if ((typeof (module_load_request['pyjamas.ui.UIObject']) == 'undefined') ||
        (module_load_request['pyjamas.ui.UIObject'] < 2)) {
        module_load_request['pyjamas.ui.UIObject'] = 2;
    }
    var modnames = new pyjslib.List([
		new pyjslib.List([
			'pyjamas']),
		new pyjslib.List([
			'pyjamas.DOM',
			'pyjamas.ui']),
		new pyjslib.List([
			]),
		new pyjslib.List([
			'pyjamas.Window'])
	]);
    sys.overrides.update(new pyjslib.Dict({
		'mozilla.pyjslib': 'mozilla.pyjslib',
		'mozilla.pyjamas.DOM': 'mozilla.pyjamas.DOM'
	}));
    path = sys.loadpath;
    /*
    pyjslib.preload_app_modules(path, modnames, pyjamas.ui.UIObject_loaded_fn,
                                            0,
                                            null);
                                            //'pyjamas.ui.UIObject');
                                            */
    //alert("module ajax loaded fn called pyjamas.ui.UIObject");

    if (sys.appname != 'pyjamas.ui.UIObject')
    {
        if (module_load_request['pyjamas.ui.UIObject'] < 3) {
            module_load_request['pyjamas.ui.UIObject'] = 3;
        }
    }
}

//alert("module ajax loaded pyjamas.ui.UIObject");

pyjamas.ui.UIObject_prepare_mod();


// pyjamas.ui.Widget

// module libs (usually imported javascript)



// module code

pyjamas.ui.Widget = function (__mod_name__) {
	if(pyjamas.ui.Widget.__was_initialized__) return;
	pyjamas.ui.Widget.__was_initialized__ = true;
	if (__mod_name__ == null) __mod_name__ = 'pyjamas.ui.Widget';
	var __name__ = pyjamas.ui.Widget.__name__ = __mod_name__;
	pyjamas.ui.Widget.__track_lines__ = new Array();
	var Widget = pyjamas.ui.Widget;

		pyjamas.ui.Widget.__track_lines__[1] = "pyjamas.ui.Widget.py, line 1:\n    # Copyright 2006 James Tauber and contributors";
		pyjamas.ui.Widget.__track_lines__[14] = "pyjamas.ui.Widget.py, line 14:\n    from pyjamas import DOM";
		pyjamas.ui.Widget.__track_lines__[15] = "pyjamas.ui.Widget.py, line 15:\n    from pyjamas import log";
		pyjamas.ui.Widget.__track_lines__[17] = "pyjamas.ui.Widget.py, line 17:\n    from pyjamas.ui.UIObject import UIObject";
		pyjamas.ui.Widget.__track_lines__[18] = "pyjamas.ui.Widget.py, line 18:\n    from pyjamas.ui import Event";
		pyjamas.ui.Widget.__track_lines__[20] = "pyjamas.ui.Widget.py, line 20:\n    class Widget(UIObject):";
		pyjamas.ui.Widget.__track_lines__[26] = "pyjamas.ui.Widget.py, line 26:\n    def __init__(self, **kwargs):";
		pyjamas.ui.Widget.__track_lines__[27] = "pyjamas.ui.Widget.py, line 27:\n    self.attached = False";
		pyjamas.ui.Widget.__track_lines__[28] = "pyjamas.ui.Widget.py, line 28:\n    self.parent = None";
		pyjamas.ui.Widget.__track_lines__[29] = "pyjamas.ui.Widget.py, line 29:\n    self.layoutData = None";
		pyjamas.ui.Widget.__track_lines__[30] = "pyjamas.ui.Widget.py, line 30:\n    self.contextMenu = None";
		pyjamas.ui.Widget.__track_lines__[32] = "pyjamas.ui.Widget.py, line 32:\n    UIObject.__init__(self, **kwargs)";
		pyjamas.ui.Widget.__track_lines__[34] = "pyjamas.ui.Widget.py, line 34:\n    def getLayoutData(self):";
		pyjamas.ui.Widget.__track_lines__[35] = "pyjamas.ui.Widget.py, line 35:\n    return self.layoutData";
		pyjamas.ui.Widget.__track_lines__[37] = "pyjamas.ui.Widget.py, line 37:\n    def getParent(self):";
		pyjamas.ui.Widget.__track_lines__[41] = "pyjamas.ui.Widget.py, line 41:\n    return self.parent";
		pyjamas.ui.Widget.__track_lines__[43] = "pyjamas.ui.Widget.py, line 43:\n    def isAttached(self):";
		pyjamas.ui.Widget.__track_lines__[45] = "pyjamas.ui.Widget.py, line 45:\n    return self.attached";
		pyjamas.ui.Widget.__track_lines__[47] = "pyjamas.ui.Widget.py, line 47:\n    def setContextMenu(self, menu):";
		pyjamas.ui.Widget.__track_lines__[48] = "pyjamas.ui.Widget.py, line 48:\n    self.contextMenu = menu";
		pyjamas.ui.Widget.__track_lines__[49] = "pyjamas.ui.Widget.py, line 49:\n    if menu:";
		pyjamas.ui.Widget.__track_lines__[50] = "pyjamas.ui.Widget.py, line 50:\n    self.sinkEvents(Event.ONCONTEXTMENU)";
		pyjamas.ui.Widget.__track_lines__[52] = "pyjamas.ui.Widget.py, line 52:\n    self.unsinkEvents(Event.ONCONTEXTMENU)";
		pyjamas.ui.Widget.__track_lines__[54] = "pyjamas.ui.Widget.py, line 54:\n    def onBrowserEvent(self, event):";
		pyjamas.ui.Widget.__track_lines__[56] = "pyjamas.ui.Widget.py, line 56:\n    if self.contextMenu is None:";
		pyjamas.ui.Widget.__track_lines__[57] = "pyjamas.ui.Widget.py, line 57:\n    return True";
		pyjamas.ui.Widget.__track_lines__[59] = "pyjamas.ui.Widget.py, line 59:\n    type = DOM.eventGetType(event)";
		pyjamas.ui.Widget.__track_lines__[60] = "pyjamas.ui.Widget.py, line 60:\n    if type == \"contextmenu\":";
		pyjamas.ui.Widget.__track_lines__[61] = "pyjamas.ui.Widget.py, line 61:\n    DOM.eventCancelBubble(event, True)";
		pyjamas.ui.Widget.__track_lines__[62] = "pyjamas.ui.Widget.py, line 62:\n    DOM.eventPreventDefault(event)";
		pyjamas.ui.Widget.__track_lines__[63] = "pyjamas.ui.Widget.py, line 63:\n    self.contextMenu.onContextMenu(self)";
		pyjamas.ui.Widget.__track_lines__[64] = "pyjamas.ui.Widget.py, line 64:\n    return False";
		pyjamas.ui.Widget.__track_lines__[66] = "pyjamas.ui.Widget.py, line 66:\n    return True";
		pyjamas.ui.Widget.__track_lines__[68] = "pyjamas.ui.Widget.py, line 68:\n    def onLoad(self):";
		pyjamas.ui.Widget.__track_lines__[69] = "pyjamas.ui.Widget.py, line 69:\n    pass";
		pyjamas.ui.Widget.__track_lines__[71] = "pyjamas.ui.Widget.py, line 71:\n    def doDetachChildren(self):";
		pyjamas.ui.Widget.__track_lines__[72] = "pyjamas.ui.Widget.py, line 72:\n    pass";
		pyjamas.ui.Widget.__track_lines__[74] = "pyjamas.ui.Widget.py, line 74:\n    def doAttachChildren(self):";
		pyjamas.ui.Widget.__track_lines__[75] = "pyjamas.ui.Widget.py, line 75:\n    pass";
		pyjamas.ui.Widget.__track_lines__[77] = "pyjamas.ui.Widget.py, line 77:\n    def onAttach(self):";
		pyjamas.ui.Widget.__track_lines__[80] = "pyjamas.ui.Widget.py, line 80:\n    if self.isAttached():";
		pyjamas.ui.Widget.__track_lines__[81] = "pyjamas.ui.Widget.py, line 81:\n    return";
		pyjamas.ui.Widget.__track_lines__[82] = "pyjamas.ui.Widget.py, line 82:\n    self.attached = True";
		pyjamas.ui.Widget.__track_lines__[83] = "pyjamas.ui.Widget.py, line 83:\n    DOM.setEventListener(self.getElement(), self)";
		pyjamas.ui.Widget.__track_lines__[84] = "pyjamas.ui.Widget.py, line 84:\n    self.doAttachChildren()";
		pyjamas.ui.Widget.__track_lines__[85] = "pyjamas.ui.Widget.py, line 85:\n    self.onLoad()";
		pyjamas.ui.Widget.__track_lines__[87] = "pyjamas.ui.Widget.py, line 87:\n    def onDetach(self):";
		pyjamas.ui.Widget.__track_lines__[89] = "pyjamas.ui.Widget.py, line 89:\n    if not self.isAttached():";
		pyjamas.ui.Widget.__track_lines__[90] = "pyjamas.ui.Widget.py, line 90:\n    return";
		pyjamas.ui.Widget.__track_lines__[91] = "pyjamas.ui.Widget.py, line 91:\n    self.doDetachChildren()";
		pyjamas.ui.Widget.__track_lines__[92] = "pyjamas.ui.Widget.py, line 92:\n    self.attached = False";
		pyjamas.ui.Widget.__track_lines__[93] = "pyjamas.ui.Widget.py, line 93:\n    DOM.setEventListener(self.getElement(), None)";
		pyjamas.ui.Widget.__track_lines__[95] = "pyjamas.ui.Widget.py, line 95:\n    def setLayoutData(self, layoutData):";
		pyjamas.ui.Widget.__track_lines__[96] = "pyjamas.ui.Widget.py, line 96:\n    self.layoutData = layoutData";
		pyjamas.ui.Widget.__track_lines__[98] = "pyjamas.ui.Widget.py, line 98:\n    def setParent(self, parent):";
		pyjamas.ui.Widget.__track_lines__[101] = "pyjamas.ui.Widget.py, line 101:\n    oldparent = self.parent";
		pyjamas.ui.Widget.__track_lines__[102] = "pyjamas.ui.Widget.py, line 102:\n    self.parent = parent";
		pyjamas.ui.Widget.__track_lines__[103] = "pyjamas.ui.Widget.py, line 103:\n    if parent == None:";
		pyjamas.ui.Widget.__track_lines__[104] = "pyjamas.ui.Widget.py, line 104:\n    if oldparent != None and oldparent.attached:";
		pyjamas.ui.Widget.__track_lines__[105] = "pyjamas.ui.Widget.py, line 105:\n    self.onDetach()";
		pyjamas.ui.Widget.__track_lines__[107] = "pyjamas.ui.Widget.py, line 107:\n    self.onAttach()";
		pyjamas.ui.Widget.__track_lines__[109] = "pyjamas.ui.Widget.py, line 109:\n    def removeFromParent(self):";
		pyjamas.ui.Widget.__track_lines__[112] = "pyjamas.ui.Widget.py, line 112:\n    if hasattr(self.parent, \"remove\"):";
		pyjamas.ui.Widget.__track_lines__[113] = "pyjamas.ui.Widget.py, line 113:\n    self.parent.remove(self)";
		pyjamas.ui.Widget.__track_lines__[115] = "pyjamas.ui.Widget.py, line 115:\n    def getID(self):";
		pyjamas.ui.Widget.__track_lines__[117] = "pyjamas.ui.Widget.py, line 117:\n    return DOM.getAttribute(self.getElement(), \"id\")";
		pyjamas.ui.Widget.__track_lines__[119] = "pyjamas.ui.Widget.py, line 119:\n    def setID(self, id):";
		pyjamas.ui.Widget.__track_lines__[121] = "pyjamas.ui.Widget.py, line 121:\n    DOM.setAttribute(self.getElement(), \"id\", id)";
	try {
		track.module='pyjamas.ui.Widget';
		track.lineno=1;
		track.lineno=14;
		modules['pyjamas'] = pyjamas();
		pyjslib.import_module(sys.loadpath, 'pyjamas.ui.Widget', 'pyjamas', 0, false);
		track.module='pyjamas.ui.Widget';

		modules['pyjamas'] = pyjamas();
		pyjslib.import_module(sys.loadpath, 'pyjamas.ui.Widget', 'pyjamas', 0, false);
		track.module='pyjamas.ui.Widget';

		modules['pyjamas.DOM'] = pyjamas.DOM();
		pyjslib.import_module(sys.loadpath, 'pyjamas.ui.Widget', 'pyjamas.DOM', 0, false);
		track.module='pyjamas.ui.Widget';

		pyjamas.ui.Widget.DOM = pyjamas.DOM;
		track.lineno=15;
		modules['pyjamas'] = pyjamas();
		pyjslib.import_module(sys.loadpath, 'pyjamas.ui.Widget', 'pyjamas', 0, false);
		track.module='pyjamas.ui.Widget';

		modules['pyjamas'] = pyjamas();
		pyjslib.import_module(sys.loadpath, 'pyjamas.ui.Widget', 'pyjamas', 0, false);
		track.module='pyjamas.ui.Widget';

		modules['pyjamas.log'] = pyjamas.log();
		pyjslib.import_module(sys.loadpath, 'pyjamas.ui.Widget', 'pyjamas.log', 0, false);
		track.module='pyjamas.ui.Widget';

		pyjamas.ui.Widget.log = pyjamas.log;
		track.lineno=17;
		modules['pyjamas'] = pyjamas();
		pyjslib.import_module(sys.loadpath, 'pyjamas.ui.Widget', 'pyjamas', 0, false);
		track.module='pyjamas.ui.Widget';

		modules['pyjamas.ui'] = pyjamas.ui();
		pyjslib.import_module(sys.loadpath, 'pyjamas.ui.Widget', 'pyjamas.ui', 0, false);
		track.module='pyjamas.ui.Widget';

		modules['pyjamas.ui.UIObject'] = pyjamas.ui.UIObject();
		pyjslib.import_module(sys.loadpath, 'pyjamas.ui.Widget', 'pyjamas.ui.UIObject', 0, false);
		track.module='pyjamas.ui.Widget';

		pyjamas.ui.Widget.UIObject = pyjamas.ui.UIObject.UIObject;
		track.lineno=18;
		modules['pyjamas'] = pyjamas();
		pyjslib.import_module(sys.loadpath, 'pyjamas.ui.Widget', 'pyjamas', 0, false);
		track.module='pyjamas.ui.Widget';

		modules['pyjamas.ui'] = pyjamas.ui();
		pyjslib.import_module(sys.loadpath, 'pyjamas.ui.Widget', 'pyjamas.ui', 0, false);
		track.module='pyjamas.ui.Widget';

		modules['pyjamas'] = pyjamas();
		pyjslib.import_module(sys.loadpath, 'pyjamas.ui.Widget', 'pyjamas', 0, false);
		track.module='pyjamas.ui.Widget';

		modules['pyjamas.ui'] = pyjamas.ui();
		pyjslib.import_module(sys.loadpath, 'pyjamas.ui.Widget', 'pyjamas.ui', 0, false);
		track.module='pyjamas.ui.Widget';

		modules['pyjamas.ui.Event'] = pyjamas.ui.Event();
		pyjslib.import_module(sys.loadpath, 'pyjamas.ui.Widget', 'pyjamas.ui.Event', 0, false);
		track.module='pyjamas.ui.Widget';

		pyjamas.ui.Widget.Event = pyjamas.ui.Event;
		track.lineno=20;
		pyjamas.ui.Widget.Widget = (function(){
			var cls_instance = pyjs__class_instance('Widget');
			var cls_definition = new Object();
			cls_definition.__md5__ = '9dbd1eb93600d587b5d1d50fdd556aee';
			cls_definition.__init__ = pyjs__bind_method(cls_instance, '__init__', function() {
				if (this.__is_instance__ === true) {
					var self = this;
					var kwargs = arguments.length >= 1 ? arguments[arguments.length-1] : arguments[arguments.length];
					if (pyjs_options.arg_count && (arguments.length < 0 || arguments.length > 1)) pyjs__exception_func_param(arguments.callee.__name__, 1, 2, arguments.length+1);
				} else {
					var self = arguments[0];
					var kwargs = arguments.length >= 2 ? arguments[arguments.length-1] : arguments[arguments.length];
					if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					if (pyjs_options.arg_count && (arguments.length < 1 || arguments.length > 2)) pyjs__exception_func_param(arguments.callee.__name__, 1, 2, arguments.length);
				}
				if (pyjs_options.arg_instance_type) {
					if (self.prototype.__md5__ !== '9dbd1eb93600d587b5d1d50fdd556aee') {
						if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
							pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
						}
					}
				}
				if (typeof kwargs == 'undefined') {
					kwargs = pyjslib.Dict({});
					if (typeof self != 'undefined') {
						if (pyjslib.get_pyjs_classtype(self) == 'Dict') {
							kwargs = self;
							self = arguments[1];
						}
					} else {
					}
				}
				track={module:pyjamas.ui.Widget, lineno:26};trackstack.push(track);
				track.module='pyjamas.ui.Widget';
				track.lineno=26;
				track.lineno=27;
				self.attached = false;
				track.lineno=28;
				self.parent = null;
				track.lineno=29;
				self.layoutData = null;
				track.lineno=30;
				self.contextMenu = null;
				track.lineno=32;
				pyjs_kwargs_method_call(pyjamas.ui.Widget.UIObject, '__init__', null, kwargs, [{}, self]);
				trackstack.pop();track=trackstack.pop();trackstack.push(track);
				return null;
			}
			, function ( __kwargs ) {
				var __r = [];
				for (var pyjs__va_arg = 1;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
					__r.push(arguments[pyjs__va_arg]);
				}

				__r.push(pyjslib.Dict(__kwargs));
				return __r;
			});
			cls_definition.getLayoutData = pyjs__bind_method(cls_instance, 'getLayoutData', function() {
				if (this.__is_instance__ === true) {
					var self = this;
					if (pyjs_options.arg_count && arguments.length != 0) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length+1);
				} else {
					var self = arguments[0];
					if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length);
				}
				if (pyjs_options.arg_instance_type) {
					if (self.prototype.__md5__ !== '9dbd1eb93600d587b5d1d50fdd556aee') {
						if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
							pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
						}
					}
				}
				track={module:pyjamas.ui.Widget, lineno:34};trackstack.push(track);
				track.module='pyjamas.ui.Widget';
				track.lineno=34;
				track.lineno=35;
				track.lineno=35;
				var pyjs__ret = (self.layoutData===undefined?(function(){throw new TypeError('self.layoutData is undefined')})():(typeof self.layoutData == 'function' && self.__is_instance__?pyjslib.getattr(self, 'layoutData'):self.layoutData));
				trackstack.pop();track=trackstack.pop();trackstack.push(track);
				return pyjs__ret;
			}
			, function ( __kwargs ) {
				if (pyjs_options.arg_kwarg_unexpected_keyword) {
					for (var i in __kwargs) {
						pyjs__exception_func_unexpected_keyword('getLayoutData', i);
					}
				}
				var __r = [];
				for (var pyjs__va_arg = 1;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
					__r.push(arguments[pyjs__va_arg]);
				}

				return __r;
			});
			cls_definition.getParent = pyjs__bind_method(cls_instance, 'getParent', function() {
				if (this.__is_instance__ === true) {
					var self = this;
					if (pyjs_options.arg_count && arguments.length != 0) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length+1);
				} else {
					var self = arguments[0];
					if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length);
				}
				if (pyjs_options.arg_instance_type) {
					if (self.prototype.__md5__ !== '9dbd1eb93600d587b5d1d50fdd556aee') {
						if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
							pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
						}
					}
				}
				track={module:pyjamas.ui.Widget, lineno:37};trackstack.push(track);
				track.module='pyjamas.ui.Widget';
				track.lineno=37;
				track.lineno=41;
				track.lineno=41;
				var pyjs__ret = (self.parent===undefined?(function(){throw new TypeError('self.parent is undefined')})():(typeof self.parent == 'function' && self.__is_instance__?pyjslib.getattr(self, 'parent'):self.parent));
				trackstack.pop();track=trackstack.pop();trackstack.push(track);
				return pyjs__ret;
			}
			, function ( __kwargs ) {
				if (pyjs_options.arg_kwarg_unexpected_keyword) {
					for (var i in __kwargs) {
						pyjs__exception_func_unexpected_keyword('getParent', i);
					}
				}
				var __r = [];
				for (var pyjs__va_arg = 1;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
					__r.push(arguments[pyjs__va_arg]);
				}

				return __r;
			});
			cls_definition.isAttached = pyjs__bind_method(cls_instance, 'isAttached', function() {
				if (this.__is_instance__ === true) {
					var self = this;
					if (pyjs_options.arg_count && arguments.length != 0) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length+1);
				} else {
					var self = arguments[0];
					if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length);
				}
				if (pyjs_options.arg_instance_type) {
					if (self.prototype.__md5__ !== '9dbd1eb93600d587b5d1d50fdd556aee') {
						if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
							pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
						}
					}
				}
				track={module:pyjamas.ui.Widget, lineno:43};trackstack.push(track);
				track.module='pyjamas.ui.Widget';
				track.lineno=43;
				track.lineno=45;
				track.lineno=45;
				var pyjs__ret = (self.attached===undefined?(function(){throw new TypeError('self.attached is undefined')})():(typeof self.attached == 'function' && self.__is_instance__?pyjslib.getattr(self, 'attached'):self.attached));
				trackstack.pop();track=trackstack.pop();trackstack.push(track);
				return pyjs__ret;
			}
			, function ( __kwargs ) {
				if (pyjs_options.arg_kwarg_unexpected_keyword) {
					for (var i in __kwargs) {
						pyjs__exception_func_unexpected_keyword('isAttached', i);
					}
				}
				var __r = [];
				for (var pyjs__va_arg = 1;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
					__r.push(arguments[pyjs__va_arg]);
				}

				return __r;
			});
			cls_definition.setContextMenu = pyjs__bind_method(cls_instance, 'setContextMenu', function(menu) {
				if (this.__is_instance__ === true) {
					var self = this;
					if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 2, 2, arguments.length+1);
				} else {
					var self = arguments[0];
					menu = arguments[1];
					if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					if (pyjs_options.arg_count && arguments.length != 2) pyjs__exception_func_param(arguments.callee.__name__, 2, 2, arguments.length);
				}
				if (pyjs_options.arg_instance_type) {
					if (self.prototype.__md5__ !== '9dbd1eb93600d587b5d1d50fdd556aee') {
						if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
							pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
						}
					}
				}
				track={module:pyjamas.ui.Widget, lineno:47};trackstack.push(track);
				track.module='pyjamas.ui.Widget';
				track.lineno=47;
				track.lineno=48;
				self.contextMenu = menu;
				track.lineno=49;
				if (pyjslib.bool(menu)) {
					track.lineno=50;
					self.sinkEvents((pyjamas.ui.Widget.Event.ONCONTEXTMENU===undefined?(function(){throw new TypeError('pyjamas.ui.Widget.Event.ONCONTEXTMENU is undefined')})():(typeof pyjamas.ui.Widget.Event.ONCONTEXTMENU == 'function' && pyjamas.ui.Widget.Event.__is_instance__?pyjslib.getattr(pyjamas.ui.Widget.Event, 'ONCONTEXTMENU'):pyjamas.ui.Widget.Event.ONCONTEXTMENU)));
				}
				else {
					track.lineno=52;
					self.unsinkEvents((pyjamas.ui.Widget.Event.ONCONTEXTMENU===undefined?(function(){throw new TypeError('pyjamas.ui.Widget.Event.ONCONTEXTMENU is undefined')})():(typeof pyjamas.ui.Widget.Event.ONCONTEXTMENU == 'function' && pyjamas.ui.Widget.Event.__is_instance__?pyjslib.getattr(pyjamas.ui.Widget.Event, 'ONCONTEXTMENU'):pyjamas.ui.Widget.Event.ONCONTEXTMENU)));
				}
				trackstack.pop();track=trackstack.pop();trackstack.push(track);
				return null;
			}
			, function ( __kwargs, menu ) {
				if (typeof menu == 'undefined') {
					menu=__kwargs.menu;
					delete __kwargs.menu;
				} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.menu != 'undefined') {
					pyjs__exception_func_multiple_values('setContextMenu', 'menu');
				}
				if (pyjs_options.arg_kwarg_unexpected_keyword) {
					for (var i in __kwargs) {
						pyjs__exception_func_unexpected_keyword('setContextMenu', i);
					}
				}
				var __r = [menu];
				for (var pyjs__va_arg = 2;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
					__r.push(arguments[pyjs__va_arg]);
				}

				return __r;
			});
			cls_definition.onBrowserEvent = pyjs__bind_method(cls_instance, 'onBrowserEvent', function(event) {
				if (this.__is_instance__ === true) {
					var self = this;
					if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 2, 2, arguments.length+1);
				} else {
					var self = arguments[0];
					event = arguments[1];
					if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					if (pyjs_options.arg_count && arguments.length != 2) pyjs__exception_func_param(arguments.callee.__name__, 2, 2, arguments.length);
				}
				if (pyjs_options.arg_instance_type) {
					if (self.prototype.__md5__ !== '9dbd1eb93600d587b5d1d50fdd556aee') {
						if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
							pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
						}
					}
				}
				track={module:pyjamas.ui.Widget, lineno:54};trackstack.push(track);
				track.module='pyjamas.ui.Widget';
				track.lineno=54;
				track.lineno=56;
				if (pyjslib.bool(((self.contextMenu===undefined?(function(){throw new TypeError('self.contextMenu is undefined')})():(typeof self.contextMenu == 'function' && self.__is_instance__?pyjslib.getattr(self, 'contextMenu'):self.contextMenu)) === null))) {
					track.lineno=57;
					track.lineno=57;
					var pyjs__ret = true;
					trackstack.pop();track=trackstack.pop();trackstack.push(track);
					return pyjs__ret;
				}
				track.lineno=59;
				var type = pyjamas.ui.Widget.DOM.eventGetType(event);
				track.lineno=60;
				if (pyjslib.bool(pyjslib.eq(type, String('contextmenu')))) {
					track.lineno=61;
					pyjamas.ui.Widget.DOM.eventCancelBubble(event, true);
					track.lineno=62;
					pyjamas.ui.Widget.DOM.eventPreventDefault(event);
					track.lineno=63;
					self.contextMenu.onContextMenu(self);
					track.lineno=64;
					track.lineno=64;
					var pyjs__ret = false;
					trackstack.pop();track=trackstack.pop();trackstack.push(track);
					return pyjs__ret;
				}
				track.lineno=66;
				track.lineno=66;
				var pyjs__ret = true;
				trackstack.pop();track=trackstack.pop();trackstack.push(track);
				return pyjs__ret;
			}
			, function ( __kwargs, event ) {
				if (typeof event == 'undefined') {
					event=__kwargs.event;
					delete __kwargs.event;
				} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.event != 'undefined') {
					pyjs__exception_func_multiple_values('onBrowserEvent', 'event');
				}
				if (pyjs_options.arg_kwarg_unexpected_keyword) {
					for (var i in __kwargs) {
						pyjs__exception_func_unexpected_keyword('onBrowserEvent', i);
					}
				}
				var __r = [event];
				for (var pyjs__va_arg = 2;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
					__r.push(arguments[pyjs__va_arg]);
				}

				return __r;
			});
			cls_definition.onLoad = pyjs__bind_method(cls_instance, 'onLoad', function() {
				if (this.__is_instance__ === true) {
					var self = this;
					if (pyjs_options.arg_count && arguments.length != 0) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length+1);
				} else {
					var self = arguments[0];
					if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length);
				}
				if (pyjs_options.arg_instance_type) {
					if (self.prototype.__md5__ !== '9dbd1eb93600d587b5d1d50fdd556aee') {
						if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
							pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
						}
					}
				}
				track={module:pyjamas.ui.Widget, lineno:68};trackstack.push(track);
				track.module='pyjamas.ui.Widget';
				track.lineno=68;
				track.lineno=69;
				trackstack.pop();track=trackstack.pop();trackstack.push(track);
				return null;
			}
			, function ( __kwargs ) {
				if (pyjs_options.arg_kwarg_unexpected_keyword) {
					for (var i in __kwargs) {
						pyjs__exception_func_unexpected_keyword('onLoad', i);
					}
				}
				var __r = [];
				for (var pyjs__va_arg = 1;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
					__r.push(arguments[pyjs__va_arg]);
				}

				return __r;
			});
			cls_definition.doDetachChildren = pyjs__bind_method(cls_instance, 'doDetachChildren', function() {
				if (this.__is_instance__ === true) {
					var self = this;
					if (pyjs_options.arg_count && arguments.length != 0) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length+1);
				} else {
					var self = arguments[0];
					if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length);
				}
				if (pyjs_options.arg_instance_type) {
					if (self.prototype.__md5__ !== '9dbd1eb93600d587b5d1d50fdd556aee') {
						if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
							pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
						}
					}
				}
				track={module:pyjamas.ui.Widget, lineno:71};trackstack.push(track);
				track.module='pyjamas.ui.Widget';
				track.lineno=71;
				track.lineno=72;
				trackstack.pop();track=trackstack.pop();trackstack.push(track);
				return null;
			}
			, function ( __kwargs ) {
				if (pyjs_options.arg_kwarg_unexpected_keyword) {
					for (var i in __kwargs) {
						pyjs__exception_func_unexpected_keyword('doDetachChildren', i);
					}
				}
				var __r = [];
				for (var pyjs__va_arg = 1;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
					__r.push(arguments[pyjs__va_arg]);
				}

				return __r;
			});
			cls_definition.doAttachChildren = pyjs__bind_method(cls_instance, 'doAttachChildren', function() {
				if (this.__is_instance__ === true) {
					var self = this;
					if (pyjs_options.arg_count && arguments.length != 0) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length+1);
				} else {
					var self = arguments[0];
					if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length);
				}
				if (pyjs_options.arg_instance_type) {
					if (self.prototype.__md5__ !== '9dbd1eb93600d587b5d1d50fdd556aee') {
						if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
							pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
						}
					}
				}
				track={module:pyjamas.ui.Widget, lineno:74};trackstack.push(track);
				track.module='pyjamas.ui.Widget';
				track.lineno=74;
				track.lineno=75;
				trackstack.pop();track=trackstack.pop();trackstack.push(track);
				return null;
			}
			, function ( __kwargs ) {
				if (pyjs_options.arg_kwarg_unexpected_keyword) {
					for (var i in __kwargs) {
						pyjs__exception_func_unexpected_keyword('doAttachChildren', i);
					}
				}
				var __r = [];
				for (var pyjs__va_arg = 1;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
					__r.push(arguments[pyjs__va_arg]);
				}

				return __r;
			});
			cls_definition.onAttach = pyjs__bind_method(cls_instance, 'onAttach', function() {
				if (this.__is_instance__ === true) {
					var self = this;
					if (pyjs_options.arg_count && arguments.length != 0) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length+1);
				} else {
					var self = arguments[0];
					if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length);
				}
				if (pyjs_options.arg_instance_type) {
					if (self.prototype.__md5__ !== '9dbd1eb93600d587b5d1d50fdd556aee') {
						if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
							pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
						}
					}
				}
				track={module:pyjamas.ui.Widget, lineno:77};trackstack.push(track);
				track.module='pyjamas.ui.Widget';
				track.lineno=77;
				track.lineno=80;
				if (pyjslib.bool(self.isAttached())) {
					track.lineno=81;
					track.lineno=81;
					var pyjs__ret = null;
					trackstack.pop();track=trackstack.pop();trackstack.push(track);
					return pyjs__ret;
				}
				track.lineno=82;
				self.attached = true;
				track.lineno=83;
				pyjamas.ui.Widget.DOM.setEventListener(self.getElement(), self);
				track.lineno=84;
				self.doAttachChildren();
				track.lineno=85;
				self.onLoad();
				trackstack.pop();track=trackstack.pop();trackstack.push(track);
				return null;
			}
			, function ( __kwargs ) {
				if (pyjs_options.arg_kwarg_unexpected_keyword) {
					for (var i in __kwargs) {
						pyjs__exception_func_unexpected_keyword('onAttach', i);
					}
				}
				var __r = [];
				for (var pyjs__va_arg = 1;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
					__r.push(arguments[pyjs__va_arg]);
				}

				return __r;
			});
			cls_definition.onDetach = pyjs__bind_method(cls_instance, 'onDetach', function() {
				if (this.__is_instance__ === true) {
					var self = this;
					if (pyjs_options.arg_count && arguments.length != 0) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length+1);
				} else {
					var self = arguments[0];
					if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length);
				}
				if (pyjs_options.arg_instance_type) {
					if (self.prototype.__md5__ !== '9dbd1eb93600d587b5d1d50fdd556aee') {
						if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
							pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
						}
					}
				}
				track={module:pyjamas.ui.Widget, lineno:87};trackstack.push(track);
				track.module='pyjamas.ui.Widget';
				track.lineno=87;
				track.lineno=89;
				if (pyjslib.bool(!(self.isAttached()))) {
					track.lineno=90;
					track.lineno=90;
					var pyjs__ret = null;
					trackstack.pop();track=trackstack.pop();trackstack.push(track);
					return pyjs__ret;
				}
				track.lineno=91;
				self.doDetachChildren();
				track.lineno=92;
				self.attached = false;
				track.lineno=93;
				pyjamas.ui.Widget.DOM.setEventListener(self.getElement(), null);
				trackstack.pop();track=trackstack.pop();trackstack.push(track);
				return null;
			}
			, function ( __kwargs ) {
				if (pyjs_options.arg_kwarg_unexpected_keyword) {
					for (var i in __kwargs) {
						pyjs__exception_func_unexpected_keyword('onDetach', i);
					}
				}
				var __r = [];
				for (var pyjs__va_arg = 1;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
					__r.push(arguments[pyjs__va_arg]);
				}

				return __r;
			});
			cls_definition.setLayoutData = pyjs__bind_method(cls_instance, 'setLayoutData', function(layoutData) {
				if (this.__is_instance__ === true) {
					var self = this;
					if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 2, 2, arguments.length+1);
				} else {
					var self = arguments[0];
					layoutData = arguments[1];
					if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					if (pyjs_options.arg_count && arguments.length != 2) pyjs__exception_func_param(arguments.callee.__name__, 2, 2, arguments.length);
				}
				if (pyjs_options.arg_instance_type) {
					if (self.prototype.__md5__ !== '9dbd1eb93600d587b5d1d50fdd556aee') {
						if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
							pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
						}
					}
				}
				track={module:pyjamas.ui.Widget, lineno:95};trackstack.push(track);
				track.module='pyjamas.ui.Widget';
				track.lineno=95;
				track.lineno=96;
				self.layoutData = layoutData;
				trackstack.pop();track=trackstack.pop();trackstack.push(track);
				return null;
			}
			, function ( __kwargs, layoutData ) {
				if (typeof layoutData == 'undefined') {
					layoutData=__kwargs.layoutData;
					delete __kwargs.layoutData;
				} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.layoutData != 'undefined') {
					pyjs__exception_func_multiple_values('setLayoutData', 'layoutData');
				}
				if (pyjs_options.arg_kwarg_unexpected_keyword) {
					for (var i in __kwargs) {
						pyjs__exception_func_unexpected_keyword('setLayoutData', i);
					}
				}
				var __r = [layoutData];
				for (var pyjs__va_arg = 2;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
					__r.push(arguments[pyjs__va_arg]);
				}

				return __r;
			});
			cls_definition.setParent = pyjs__bind_method(cls_instance, 'setParent', function(parent) {
				if (this.__is_instance__ === true) {
					var self = this;
					if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 2, 2, arguments.length+1);
				} else {
					var self = arguments[0];
					parent = arguments[1];
					if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					if (pyjs_options.arg_count && arguments.length != 2) pyjs__exception_func_param(arguments.callee.__name__, 2, 2, arguments.length);
				}
				if (pyjs_options.arg_instance_type) {
					if (self.prototype.__md5__ !== '9dbd1eb93600d587b5d1d50fdd556aee') {
						if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
							pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
						}
					}
				}
				track={module:pyjamas.ui.Widget, lineno:98};trackstack.push(track);
				track.module='pyjamas.ui.Widget';
				track.lineno=98;
				track.lineno=101;
				var oldparent = (self.parent===undefined?(function(){throw new TypeError('self.parent is undefined')})():(typeof self.parent == 'function' && self.__is_instance__?pyjslib.getattr(self, 'parent'):self.parent));
				track.lineno=102;
				self.parent = parent;
				track.lineno=103;
				if (pyjslib.bool(pyjslib.eq(parent, null))) {
					track.lineno=104;
					if (pyjslib.bool(((oldparent != null)) && ((oldparent.attached===undefined?(function(){throw new TypeError('oldparent.attached is undefined')})():(typeof oldparent.attached == 'function' && oldparent.__is_instance__?pyjslib.getattr(oldparent, 'attached'):oldparent.attached))))) {
						track.lineno=105;
						self.onDetach();
					}
				}
				else if (pyjslib.bool((parent.attached===undefined?(function(){throw new TypeError('parent.attached is undefined')})():(typeof parent.attached == 'function' && parent.__is_instance__?pyjslib.getattr(parent, 'attached'):parent.attached)))) {
					track.lineno=107;
					self.onAttach();
				}
				trackstack.pop();track=trackstack.pop();trackstack.push(track);
				return null;
			}
			, function ( __kwargs, parent ) {
				if (typeof parent == 'undefined') {
					parent=__kwargs.parent;
					delete __kwargs.parent;
				} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.parent != 'undefined') {
					pyjs__exception_func_multiple_values('setParent', 'parent');
				}
				if (pyjs_options.arg_kwarg_unexpected_keyword) {
					for (var i in __kwargs) {
						pyjs__exception_func_unexpected_keyword('setParent', i);
					}
				}
				var __r = [parent];
				for (var pyjs__va_arg = 2;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
					__r.push(arguments[pyjs__va_arg]);
				}

				return __r;
			});
			cls_definition.removeFromParent = pyjs__bind_method(cls_instance, 'removeFromParent', function() {
				if (this.__is_instance__ === true) {
					var self = this;
					if (pyjs_options.arg_count && arguments.length != 0) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length+1);
				} else {
					var self = arguments[0];
					if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length);
				}
				if (pyjs_options.arg_instance_type) {
					if (self.prototype.__md5__ !== '9dbd1eb93600d587b5d1d50fdd556aee') {
						if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
							pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
						}
					}
				}
				track={module:pyjamas.ui.Widget, lineno:109};trackstack.push(track);
				track.module='pyjamas.ui.Widget';
				track.lineno=109;
				track.lineno=112;
				if (pyjslib.bool(pyjslib.hasattr((self.parent===undefined?(function(){throw new TypeError('self.parent is undefined')})():(typeof self.parent == 'function' && self.__is_instance__?pyjslib.getattr(self, 'parent'):self.parent)), String('remove')))) {
					track.lineno=113;
					self.parent.remove(self);
				}
				trackstack.pop();track=trackstack.pop();trackstack.push(track);
				return null;
			}
			, function ( __kwargs ) {
				if (pyjs_options.arg_kwarg_unexpected_keyword) {
					for (var i in __kwargs) {
						pyjs__exception_func_unexpected_keyword('removeFromParent', i);
					}
				}
				var __r = [];
				for (var pyjs__va_arg = 1;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
					__r.push(arguments[pyjs__va_arg]);
				}

				return __r;
			});
			cls_definition.getID = pyjs__bind_method(cls_instance, 'getID', function() {
				if (this.__is_instance__ === true) {
					var self = this;
					if (pyjs_options.arg_count && arguments.length != 0) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length+1);
				} else {
					var self = arguments[0];
					if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length);
				}
				if (pyjs_options.arg_instance_type) {
					if (self.prototype.__md5__ !== '9dbd1eb93600d587b5d1d50fdd556aee') {
						if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
							pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
						}
					}
				}
				track={module:pyjamas.ui.Widget, lineno:115};trackstack.push(track);
				track.module='pyjamas.ui.Widget';
				track.lineno=115;
				track.lineno=117;
				track.lineno=117;
				var pyjs__ret = pyjamas.ui.Widget.DOM.getAttribute(self.getElement(), String('id'));
				trackstack.pop();track=trackstack.pop();trackstack.push(track);
				return pyjs__ret;
			}
			, function ( __kwargs ) {
				if (pyjs_options.arg_kwarg_unexpected_keyword) {
					for (var i in __kwargs) {
						pyjs__exception_func_unexpected_keyword('getID', i);
					}
				}
				var __r = [];
				for (var pyjs__va_arg = 1;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
					__r.push(arguments[pyjs__va_arg]);
				}

				return __r;
			});
			cls_definition.setID = pyjs__bind_method(cls_instance, 'setID', function(id) {
				if (this.__is_instance__ === true) {
					var self = this;
					if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 2, 2, arguments.length+1);
				} else {
					var self = arguments[0];
					id = arguments[1];
					if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					if (pyjs_options.arg_count && arguments.length != 2) pyjs__exception_func_param(arguments.callee.__name__, 2, 2, arguments.length);
				}
				if (pyjs_options.arg_instance_type) {
					if (self.prototype.__md5__ !== '9dbd1eb93600d587b5d1d50fdd556aee') {
						if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
							pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
						}
					}
				}
				track={module:pyjamas.ui.Widget, lineno:119};trackstack.push(track);
				track.module='pyjamas.ui.Widget';
				track.lineno=119;
				track.lineno=121;
				pyjamas.ui.Widget.DOM.setAttribute(self.getElement(), String('id'), id);
				trackstack.pop();track=trackstack.pop();trackstack.push(track);
				return null;
			}
			, function ( __kwargs, id ) {
				if (typeof id == 'undefined') {
					id=__kwargs.id;
					delete __kwargs.id;
				} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.id != 'undefined') {
					pyjs__exception_func_multiple_values('setID', 'id');
				}
				if (pyjs_options.arg_kwarg_unexpected_keyword) {
					for (var i in __kwargs) {
						pyjs__exception_func_unexpected_keyword('setID', i);
					}
				}
				var __r = [id];
				for (var pyjs__va_arg = 2;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
					__r.push(arguments[pyjs__va_arg]);
				}

				return __r;
			});
			return pyjs__class_function(cls_instance, cls_definition, 
			                            new Array(pyjamas.ui.Widget.UIObject));
		})();

	} catch (pyjs_attr_err) {throw pyjslib._errorMapping(pyjs_attr_err)};
return this;
}; /* end pyjamas.ui.Widget */ 




pyjamas.ui.Widget_loaded_fn = function() {
}

pyjamas.ui.Widget_prepare_mod = function() {
    if ((typeof (module_load_request['pyjamas.ui.Widget']) == 'undefined') ||
        (module_load_request['pyjamas.ui.Widget'] < 2)) {
        module_load_request['pyjamas.ui.Widget'] = 2;
    }
    var modnames = new pyjslib.List([
		new pyjslib.List([
			'pyjamas']),
		new pyjslib.List([
			'pyjamas.DOM',
			'pyjamas.ui']),
		new pyjslib.List([
			'pyjamas.log',
			'pyjamas.ui.Event']),
		new pyjslib.List([
			'pyjamas.ui.UIObject'])
	]);
    sys.overrides.update(new pyjslib.Dict({
		'mozilla.pyjslib': 'mozilla.pyjslib',
		'mozilla.pyjamas.DOM': 'mozilla.pyjamas.DOM'
	}));
    path = sys.loadpath;
    /*
    pyjslib.preload_app_modules(path, modnames, pyjamas.ui.Widget_loaded_fn,
                                            0,
                                            null);
                                            //'pyjamas.ui.Widget');
                                            */
    //alert("module ajax loaded fn called pyjamas.ui.Widget");

    if (sys.appname != 'pyjamas.ui.Widget')
    {
        if (module_load_request['pyjamas.ui.Widget'] < 3) {
            module_load_request['pyjamas.ui.Widget'] = 3;
        }
    }
}

//alert("module ajax loaded pyjamas.ui.Widget");

pyjamas.ui.Widget_prepare_mod();


// pyjamas.ui.Image

// module libs (usually imported javascript)



// module code

pyjamas.ui.Image = function (__mod_name__) {
	if(pyjamas.ui.Image.__was_initialized__) return;
	pyjamas.ui.Image.__was_initialized__ = true;
	if (__mod_name__ == null) __mod_name__ = 'pyjamas.ui.Image';
	var __name__ = pyjamas.ui.Image.__name__ = __mod_name__;
	pyjamas.ui.Image.__track_lines__ = new Array();
	var Image = pyjamas.ui.Image;

		pyjamas.ui.Image.__track_lines__[1] = "pyjamas.ui.Image.py, line 1:\n    # Copyright 2006 James Tauber and contributors";
		pyjamas.ui.Image.__track_lines__[14] = "pyjamas.ui.Image.py, line 14:\n    from pyjamas import DOM";
		pyjamas.ui.Image.__track_lines__[16] = "pyjamas.ui.Image.py, line 16:\n    from pyjamas.ui.Widget import Widget";
		pyjamas.ui.Image.__track_lines__[17] = "pyjamas.ui.Image.py, line 17:\n    from pyjamas.ui import Event";
		pyjamas.ui.Image.__track_lines__[18] = "pyjamas.ui.Image.py, line 18:\n    from pyjamas.ui import MouseListener";
		pyjamas.ui.Image.__track_lines__[20] = "pyjamas.ui.Image.py, line 20:\n    prefetchImages = {}";
		pyjamas.ui.Image.__track_lines__[22] = "pyjamas.ui.Image.py, line 22:\n    class Image(Widget):";
		pyjamas.ui.Image.__track_lines__[23] = "pyjamas.ui.Image.py, line 23:\n    def __init__(self, url=\"\"):";
		pyjamas.ui.Image.__track_lines__[24] = "pyjamas.ui.Image.py, line 24:\n    Widget.__init__(self)";
		pyjamas.ui.Image.__track_lines__[25] = "pyjamas.ui.Image.py, line 25:\n    self.clickListeners = []";
		pyjamas.ui.Image.__track_lines__[26] = "pyjamas.ui.Image.py, line 26:\n    self.loadListeners = []";
		pyjamas.ui.Image.__track_lines__[27] = "pyjamas.ui.Image.py, line 27:\n    self.mouseListeners = []";
		pyjamas.ui.Image.__track_lines__[29] = "pyjamas.ui.Image.py, line 29:\n    self.setElement(DOM.createImg())";
		pyjamas.ui.Image.__track_lines__[30] = "pyjamas.ui.Image.py, line 30:\n    self.sinkEvents(Event.ONCLICK | Event.MOUSEEVENTS | Event.ONLOAD | Event.ONERROR)";
		pyjamas.ui.Image.__track_lines__[31] = "pyjamas.ui.Image.py, line 31:\n    self.setStyleName(\"gwt-Image\")";
		pyjamas.ui.Image.__track_lines__[33] = "pyjamas.ui.Image.py, line 33:\n    if url:";
		pyjamas.ui.Image.__track_lines__[34] = "pyjamas.ui.Image.py, line 34:\n    self.setUrl(url)";
		pyjamas.ui.Image.__track_lines__[36] = "pyjamas.ui.Image.py, line 36:\n    def addClickListener(self, listener):";
		pyjamas.ui.Image.__track_lines__[37] = "pyjamas.ui.Image.py, line 37:\n    self.clickListeners.append(listener)";
		pyjamas.ui.Image.__track_lines__[39] = "pyjamas.ui.Image.py, line 39:\n    def addLoadListener(self, listener):";
		pyjamas.ui.Image.__track_lines__[40] = "pyjamas.ui.Image.py, line 40:\n    self.loadListeners.append(listener)";
		pyjamas.ui.Image.__track_lines__[42] = "pyjamas.ui.Image.py, line 42:\n    def addMouseListener(self, listener):";
		pyjamas.ui.Image.__track_lines__[43] = "pyjamas.ui.Image.py, line 43:\n    self.mouseListeners.append(listener)";
		pyjamas.ui.Image.__track_lines__[45] = "pyjamas.ui.Image.py, line 45:\n    def getUrl(self):";
		pyjamas.ui.Image.__track_lines__[46] = "pyjamas.ui.Image.py, line 46:\n    return DOM.getAttribute(self.getElement(), \"src\")";
		pyjamas.ui.Image.__track_lines__[48] = "pyjamas.ui.Image.py, line 48:\n    def onBrowserEvent(self, event):";
		pyjamas.ui.Image.__track_lines__[49] = "pyjamas.ui.Image.py, line 49:\n    type = DOM.eventGetType(event)";
		pyjamas.ui.Image.__track_lines__[50] = "pyjamas.ui.Image.py, line 50:\n    if type == \"click\":";
		pyjamas.ui.Image.__track_lines__[51] = "pyjamas.ui.Image.py, line 51:\n    for listener in self.clickListeners:";
		pyjamas.ui.Image.__track_lines__[52] = "pyjamas.ui.Image.py, line 52:\n    if hasattr(listener, \'onClick\'): listener.onClick(self)";
		pyjamas.ui.Image.__track_lines__[53] = "pyjamas.ui.Image.py, line 53:\n    else: listener(self)";
		pyjamas.ui.Image.__track_lines__[55] = "pyjamas.ui.Image.py, line 55:\n    MouseListener.fireMouseEvent(self.mouseListeners, self, event)";
		pyjamas.ui.Image.__track_lines__[57] = "pyjamas.ui.Image.py, line 57:\n    for listener in self.loadListeners:";
		pyjamas.ui.Image.__track_lines__[58] = "pyjamas.ui.Image.py, line 58:\n    listener.onLoad(self)";
		pyjamas.ui.Image.__track_lines__[60] = "pyjamas.ui.Image.py, line 60:\n    for listener in self.loadListeners:";
		pyjamas.ui.Image.__track_lines__[61] = "pyjamas.ui.Image.py, line 61:\n    listener.onError(self)";
		pyjamas.ui.Image.__track_lines__[63] = "pyjamas.ui.Image.py, line 63:\n    def prefetch(self, url):";
		pyjamas.ui.Image.__track_lines__[64] = "pyjamas.ui.Image.py, line 64:\n    global prefetchImages";
		pyjamas.ui.Image.__track_lines__[66] = "pyjamas.ui.Image.py, line 66:\n    img = DOM.createImg()";
		pyjamas.ui.Image.__track_lines__[67] = "pyjamas.ui.Image.py, line 67:\n    DOM.setAttribute(img, \"src\", url)";
		pyjamas.ui.Image.__track_lines__[68] = "pyjamas.ui.Image.py, line 68:\n    prefetchImages[url] = img";
		pyjamas.ui.Image.__track_lines__[70] = "pyjamas.ui.Image.py, line 70:\n    def setUrl(self, url):";
		pyjamas.ui.Image.__track_lines__[71] = "pyjamas.ui.Image.py, line 71:\n    DOM.setAttribute(self.getElement(), \"src\", url)";
	try {
		track.module='pyjamas.ui.Image';
		track.lineno=1;
		track.lineno=14;
		modules['pyjamas'] = pyjamas();
		pyjslib.import_module(sys.loadpath, 'pyjamas.ui.Image', 'pyjamas', 0, false);
		track.module='pyjamas.ui.Image';

		modules['pyjamas'] = pyjamas();
		pyjslib.import_module(sys.loadpath, 'pyjamas.ui.Image', 'pyjamas', 0, false);
		track.module='pyjamas.ui.Image';

		modules['pyjamas.DOM'] = pyjamas.DOM();
		pyjslib.import_module(sys.loadpath, 'pyjamas.ui.Image', 'pyjamas.DOM', 0, false);
		track.module='pyjamas.ui.Image';

		pyjamas.ui.Image.DOM = pyjamas.DOM;
		track.lineno=16;
		modules['pyjamas'] = pyjamas();
		pyjslib.import_module(sys.loadpath, 'pyjamas.ui.Image', 'pyjamas', 0, false);
		track.module='pyjamas.ui.Image';

		modules['pyjamas.ui'] = pyjamas.ui();
		pyjslib.import_module(sys.loadpath, 'pyjamas.ui.Image', 'pyjamas.ui', 0, false);
		track.module='pyjamas.ui.Image';

		modules['pyjamas.ui.Widget'] = pyjamas.ui.Widget();
		pyjslib.import_module(sys.loadpath, 'pyjamas.ui.Image', 'pyjamas.ui.Widget', 0, false);
		track.module='pyjamas.ui.Image';

		pyjamas.ui.Image.Widget = pyjamas.ui.Widget.Widget;
		track.lineno=17;
		modules['pyjamas'] = pyjamas();
		pyjslib.import_module(sys.loadpath, 'pyjamas.ui.Image', 'pyjamas', 0, false);
		track.module='pyjamas.ui.Image';

		modules['pyjamas.ui'] = pyjamas.ui();
		pyjslib.import_module(sys.loadpath, 'pyjamas.ui.Image', 'pyjamas.ui', 0, false);
		track.module='pyjamas.ui.Image';

		modules['pyjamas'] = pyjamas();
		pyjslib.import_module(sys.loadpath, 'pyjamas.ui.Image', 'pyjamas', 0, false);
		track.module='pyjamas.ui.Image';

		modules['pyjamas.ui'] = pyjamas.ui();
		pyjslib.import_module(sys.loadpath, 'pyjamas.ui.Image', 'pyjamas.ui', 0, false);
		track.module='pyjamas.ui.Image';

		modules['pyjamas.ui.Event'] = pyjamas.ui.Event();
		pyjslib.import_module(sys.loadpath, 'pyjamas.ui.Image', 'pyjamas.ui.Event', 0, false);
		track.module='pyjamas.ui.Image';

		pyjamas.ui.Image.Event = pyjamas.ui.Event;
		track.lineno=18;
		modules['pyjamas'] = pyjamas();
		pyjslib.import_module(sys.loadpath, 'pyjamas.ui.Image', 'pyjamas', 0, false);
		track.module='pyjamas.ui.Image';

		modules['pyjamas.ui'] = pyjamas.ui();
		pyjslib.import_module(sys.loadpath, 'pyjamas.ui.Image', 'pyjamas.ui', 0, false);
		track.module='pyjamas.ui.Image';

		modules['pyjamas'] = pyjamas();
		pyjslib.import_module(sys.loadpath, 'pyjamas.ui.Image', 'pyjamas', 0, false);
		track.module='pyjamas.ui.Image';

		modules['pyjamas.ui'] = pyjamas.ui();
		pyjslib.import_module(sys.loadpath, 'pyjamas.ui.Image', 'pyjamas.ui', 0, false);
		track.module='pyjamas.ui.Image';

		modules['pyjamas.ui.MouseListener'] = pyjamas.ui.MouseListener();
		pyjslib.import_module(sys.loadpath, 'pyjamas.ui.Image', 'pyjamas.ui.MouseListener', 0, false);
		track.module='pyjamas.ui.Image';

		pyjamas.ui.Image.MouseListener = pyjamas.ui.MouseListener;
		track.lineno=20;
		pyjamas.ui.Image.prefetchImages = new pyjslib.Dict([]);
		track.lineno=22;
		pyjamas.ui.Image.Image = (function(){
			var cls_instance = pyjs__class_instance('Image');
			var cls_definition = new Object();
			cls_definition.__md5__ = 'b67a915619eb3be521abb51e39bc92f2';
			cls_definition.__init__ = pyjs__bind_method(cls_instance, '__init__', function(url) {
				if (this.__is_instance__ === true) {
					var self = this;
					if (pyjs_options.arg_count && (arguments.length < 0 || arguments.length > 1)) pyjs__exception_func_param(arguments.callee.__name__, 1, 2, arguments.length+1);
				} else {
					var self = arguments[0];
					url = arguments[1];
					if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					if (pyjs_options.arg_count && (arguments.length < 1 || arguments.length > 2)) pyjs__exception_func_param(arguments.callee.__name__, 1, 2, arguments.length);
				}
				if (pyjs_options.arg_instance_type) {
					if (self.prototype.__md5__ !== 'b67a915619eb3be521abb51e39bc92f2') {
						if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
							pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
						}
					}
				}
				if (typeof url == 'undefined') url=String('');
				track={module:pyjamas.ui.Image, lineno:23};trackstack.push(track);
				track.module='pyjamas.ui.Image';
				track.lineno=23;
				track.lineno=24;
				pyjamas.ui.Image.Widget.__init__(self);
				track.lineno=25;
				self.clickListeners = new pyjslib.List([]);
				track.lineno=26;
				self.loadListeners = new pyjslib.List([]);
				track.lineno=27;
				self.mouseListeners = new pyjslib.List([]);
				track.lineno=29;
				self.setElement(pyjamas.ui.Image.DOM.createImg());
				track.lineno=30;
				self.sinkEvents(((pyjamas.ui.Image.Event.ONCLICK===undefined?(function(){throw new TypeError('pyjamas.ui.Image.Event.ONCLICK is undefined')})():(typeof pyjamas.ui.Image.Event.ONCLICK == 'function' && pyjamas.ui.Image.Event.__is_instance__?pyjslib.getattr(pyjamas.ui.Image.Event, 'ONCLICK'):pyjamas.ui.Image.Event.ONCLICK)) | (pyjamas.ui.Image.Event.MOUSEEVENTS===undefined?(function(){throw new TypeError('pyjamas.ui.Image.Event.MOUSEEVENTS is undefined')})():(typeof pyjamas.ui.Image.Event.MOUSEEVENTS == 'function' && pyjamas.ui.Image.Event.__is_instance__?pyjslib.getattr(pyjamas.ui.Image.Event, 'MOUSEEVENTS'):pyjamas.ui.Image.Event.MOUSEEVENTS)) | (pyjamas.ui.Image.Event.ONLOAD===undefined?(function(){throw new TypeError('pyjamas.ui.Image.Event.ONLOAD is undefined')})():(typeof pyjamas.ui.Image.Event.ONLOAD == 'function' && pyjamas.ui.Image.Event.__is_instance__?pyjslib.getattr(pyjamas.ui.Image.Event, 'ONLOAD'):pyjamas.ui.Image.Event.ONLOAD)) | (pyjamas.ui.Image.Event.ONERROR===undefined?(function(){throw new TypeError('pyjamas.ui.Image.Event.ONERROR is undefined')})():(typeof pyjamas.ui.Image.Event.ONERROR == 'function' && pyjamas.ui.Image.Event.__is_instance__?pyjslib.getattr(pyjamas.ui.Image.Event, 'ONERROR'):pyjamas.ui.Image.Event.ONERROR))));
				track.lineno=31;
				self.setStyleName(String('gwt-Image'));
				track.lineno=33;
				if (pyjslib.bool(url)) {
					track.lineno=34;
					self.setUrl(url);
				}
				trackstack.pop();track=trackstack.pop();trackstack.push(track);
				return null;
			}
			, function ( __kwargs, url ) {
				if (typeof url == 'undefined') {
					url=__kwargs.url;
					delete __kwargs.url;
				} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.url != 'undefined') {
					pyjs__exception_func_multiple_values('__init__', 'url');
				}
				if (pyjs_options.arg_kwarg_unexpected_keyword) {
					for (var i in __kwargs) {
						pyjs__exception_func_unexpected_keyword('__init__', i);
					}
				}
				var __r = [url];
				for (var pyjs__va_arg = 2;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
					__r.push(arguments[pyjs__va_arg]);
				}

				return __r;
			});
			cls_definition.addClickListener = pyjs__bind_method(cls_instance, 'addClickListener', function(listener) {
				if (this.__is_instance__ === true) {
					var self = this;
					if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 2, 2, arguments.length+1);
				} else {
					var self = arguments[0];
					listener = arguments[1];
					if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					if (pyjs_options.arg_count && arguments.length != 2) pyjs__exception_func_param(arguments.callee.__name__, 2, 2, arguments.length);
				}
				if (pyjs_options.arg_instance_type) {
					if (self.prototype.__md5__ !== 'b67a915619eb3be521abb51e39bc92f2') {
						if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
							pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
						}
					}
				}
				track={module:pyjamas.ui.Image, lineno:36};trackstack.push(track);
				track.module='pyjamas.ui.Image';
				track.lineno=36;
				track.lineno=37;
				self.clickListeners.append(listener);
				trackstack.pop();track=trackstack.pop();trackstack.push(track);
				return null;
			}
			, function ( __kwargs, listener ) {
				if (typeof listener == 'undefined') {
					listener=__kwargs.listener;
					delete __kwargs.listener;
				} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.listener != 'undefined') {
					pyjs__exception_func_multiple_values('addClickListener', 'listener');
				}
				if (pyjs_options.arg_kwarg_unexpected_keyword) {
					for (var i in __kwargs) {
						pyjs__exception_func_unexpected_keyword('addClickListener', i);
					}
				}
				var __r = [listener];
				for (var pyjs__va_arg = 2;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
					__r.push(arguments[pyjs__va_arg]);
				}

				return __r;
			});
			cls_definition.addLoadListener = pyjs__bind_method(cls_instance, 'addLoadListener', function(listener) {
				if (this.__is_instance__ === true) {
					var self = this;
					if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 2, 2, arguments.length+1);
				} else {
					var self = arguments[0];
					listener = arguments[1];
					if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					if (pyjs_options.arg_count && arguments.length != 2) pyjs__exception_func_param(arguments.callee.__name__, 2, 2, arguments.length);
				}
				if (pyjs_options.arg_instance_type) {
					if (self.prototype.__md5__ !== 'b67a915619eb3be521abb51e39bc92f2') {
						if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
							pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
						}
					}
				}
				track={module:pyjamas.ui.Image, lineno:39};trackstack.push(track);
				track.module='pyjamas.ui.Image';
				track.lineno=39;
				track.lineno=40;
				self.loadListeners.append(listener);
				trackstack.pop();track=trackstack.pop();trackstack.push(track);
				return null;
			}
			, function ( __kwargs, listener ) {
				if (typeof listener == 'undefined') {
					listener=__kwargs.listener;
					delete __kwargs.listener;
				} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.listener != 'undefined') {
					pyjs__exception_func_multiple_values('addLoadListener', 'listener');
				}
				if (pyjs_options.arg_kwarg_unexpected_keyword) {
					for (var i in __kwargs) {
						pyjs__exception_func_unexpected_keyword('addLoadListener', i);
					}
				}
				var __r = [listener];
				for (var pyjs__va_arg = 2;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
					__r.push(arguments[pyjs__va_arg]);
				}

				return __r;
			});
			cls_definition.addMouseListener = pyjs__bind_method(cls_instance, 'addMouseListener', function(listener) {
				if (this.__is_instance__ === true) {
					var self = this;
					if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 2, 2, arguments.length+1);
				} else {
					var self = arguments[0];
					listener = arguments[1];
					if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					if (pyjs_options.arg_count && arguments.length != 2) pyjs__exception_func_param(arguments.callee.__name__, 2, 2, arguments.length);
				}
				if (pyjs_options.arg_instance_type) {
					if (self.prototype.__md5__ !== 'b67a915619eb3be521abb51e39bc92f2') {
						if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
							pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
						}
					}
				}
				track={module:pyjamas.ui.Image, lineno:42};trackstack.push(track);
				track.module='pyjamas.ui.Image';
				track.lineno=42;
				track.lineno=43;
				self.mouseListeners.append(listener);
				trackstack.pop();track=trackstack.pop();trackstack.push(track);
				return null;
			}
			, function ( __kwargs, listener ) {
				if (typeof listener == 'undefined') {
					listener=__kwargs.listener;
					delete __kwargs.listener;
				} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.listener != 'undefined') {
					pyjs__exception_func_multiple_values('addMouseListener', 'listener');
				}
				if (pyjs_options.arg_kwarg_unexpected_keyword) {
					for (var i in __kwargs) {
						pyjs__exception_func_unexpected_keyword('addMouseListener', i);
					}
				}
				var __r = [listener];
				for (var pyjs__va_arg = 2;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
					__r.push(arguments[pyjs__va_arg]);
				}

				return __r;
			});
			cls_definition.getUrl = pyjs__bind_method(cls_instance, 'getUrl', function() {
				if (this.__is_instance__ === true) {
					var self = this;
					if (pyjs_options.arg_count && arguments.length != 0) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length+1);
				} else {
					var self = arguments[0];
					if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length);
				}
				if (pyjs_options.arg_instance_type) {
					if (self.prototype.__md5__ !== 'b67a915619eb3be521abb51e39bc92f2') {
						if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
							pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
						}
					}
				}
				track={module:pyjamas.ui.Image, lineno:45};trackstack.push(track);
				track.module='pyjamas.ui.Image';
				track.lineno=45;
				track.lineno=46;
				track.lineno=46;
				var pyjs__ret = pyjamas.ui.Image.DOM.getAttribute(self.getElement(), String('src'));
				trackstack.pop();track=trackstack.pop();trackstack.push(track);
				return pyjs__ret;
			}
			, function ( __kwargs ) {
				if (pyjs_options.arg_kwarg_unexpected_keyword) {
					for (var i in __kwargs) {
						pyjs__exception_func_unexpected_keyword('getUrl', i);
					}
				}
				var __r = [];
				for (var pyjs__va_arg = 1;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
					__r.push(arguments[pyjs__va_arg]);
				}

				return __r;
			});
			cls_definition.onBrowserEvent = pyjs__bind_method(cls_instance, 'onBrowserEvent', function(event) {
				if (this.__is_instance__ === true) {
					var self = this;
					if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 2, 2, arguments.length+1);
				} else {
					var self = arguments[0];
					event = arguments[1];
					if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					if (pyjs_options.arg_count && arguments.length != 2) pyjs__exception_func_param(arguments.callee.__name__, 2, 2, arguments.length);
				}
				if (pyjs_options.arg_instance_type) {
					if (self.prototype.__md5__ !== 'b67a915619eb3be521abb51e39bc92f2') {
						if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
							pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
						}
					}
				}
				track={module:pyjamas.ui.Image, lineno:48};trackstack.push(track);
				track.module='pyjamas.ui.Image';
				track.lineno=48;
				track.lineno=49;
				var type = pyjamas.ui.Image.DOM.eventGetType(event);
				track.lineno=50;
				if (pyjslib.bool(pyjslib.eq(type, String('click')))) {
					track.lineno=51;
					var pyjs__trackstack_size_1=trackstack.length;
					var __listener = self.clickListeners.__iter__();
					try {
						while (true) {
							var listener = __listener.next();
							
							track.lineno=52;
							if (pyjslib.bool(pyjslib.hasattr(listener, String('onClick')))) {
								track.lineno=52;
								listener.onClick(self);
							}
							else {
								track.lineno=53;
								listener(self);
							}
						}
					} catch (e) {
						if (e.__name__ != 'StopIteration') {
							throw e;
						}
					}
					if (trackstack.length > pyjs__trackstack_size_1) {
						trackstack = trackstack.slice(0,pyjs__trackstack_size_1);
						track = trackstack.slice(-1)[0];
					}
					track.module='pyjamas.ui.Image';
				}
				else if (pyjslib.bool((pyjslib.eq(type, String('mousedown'))) || (pyjslib.eq(type, String('mouseup'))) || (pyjslib.eq(type, String('mousemove'))) || (pyjslib.eq(type, String('mouseover'))) || (pyjslib.eq(type, String('mouseout'))))) {
					track.lineno=55;
					pyjamas.ui.Image.MouseListener.fireMouseEvent((self.mouseListeners===undefined?(function(){throw new TypeError('self.mouseListeners is undefined')})():(typeof self.mouseListeners == 'function' && self.__is_instance__?pyjslib.getattr(self, 'mouseListeners'):self.mouseListeners)), self, event);
				}
				else if (pyjslib.bool(pyjslib.eq(type, String('load')))) {
					track.lineno=57;
					var pyjs__trackstack_size_1=trackstack.length;
					var __listener = self.loadListeners.__iter__();
					try {
						while (true) {
							var listener = __listener.next();
							
							track.lineno=58;
							listener.onLoad(self);
						}
					} catch (e) {
						if (e.__name__ != 'StopIteration') {
							throw e;
						}
					}
					if (trackstack.length > pyjs__trackstack_size_1) {
						trackstack = trackstack.slice(0,pyjs__trackstack_size_1);
						track = trackstack.slice(-1)[0];
					}
					track.module='pyjamas.ui.Image';
				}
				else if (pyjslib.bool(pyjslib.eq(type, String('error')))) {
					track.lineno=60;
					var pyjs__trackstack_size_1=trackstack.length;
					var __listener = self.loadListeners.__iter__();
					try {
						while (true) {
							var listener = __listener.next();
							
							track.lineno=61;
							listener.onError(self);
						}
					} catch (e) {
						if (e.__name__ != 'StopIteration') {
							throw e;
						}
					}
					if (trackstack.length > pyjs__trackstack_size_1) {
						trackstack = trackstack.slice(0,pyjs__trackstack_size_1);
						track = trackstack.slice(-1)[0];
					}
					track.module='pyjamas.ui.Image';
				}
				trackstack.pop();track=trackstack.pop();trackstack.push(track);
				return null;
			}
			, function ( __kwargs, event ) {
				if (typeof event == 'undefined') {
					event=__kwargs.event;
					delete __kwargs.event;
				} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.event != 'undefined') {
					pyjs__exception_func_multiple_values('onBrowserEvent', 'event');
				}
				if (pyjs_options.arg_kwarg_unexpected_keyword) {
					for (var i in __kwargs) {
						pyjs__exception_func_unexpected_keyword('onBrowserEvent', i);
					}
				}
				var __r = [event];
				for (var pyjs__va_arg = 2;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
					__r.push(arguments[pyjs__va_arg]);
				}

				return __r;
			});
			cls_definition.prefetch = pyjs__bind_method(cls_instance, 'prefetch', function(url) {
				if (this.__is_instance__ === true) {
					var self = this;
					if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 2, 2, arguments.length+1);
				} else {
					var self = arguments[0];
					url = arguments[1];
					if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					if (pyjs_options.arg_count && arguments.length != 2) pyjs__exception_func_param(arguments.callee.__name__, 2, 2, arguments.length);
				}
				if (pyjs_options.arg_instance_type) {
					if (self.prototype.__md5__ !== 'b67a915619eb3be521abb51e39bc92f2') {
						if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
							pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
						}
					}
				}
				track={module:pyjamas.ui.Image, lineno:63};trackstack.push(track);
				track.module='pyjamas.ui.Image';
				track.lineno=63;
				track.lineno=64;
				track.lineno=66;
				var img = pyjamas.ui.Image.DOM.createImg();
				track.lineno=67;
				pyjamas.ui.Image.DOM.setAttribute(img, String('src'), url);
				track.lineno=68;
				pyjamas.ui.Image.prefetchImages.__setitem__(url, img);
				trackstack.pop();track=trackstack.pop();trackstack.push(track);
				return null;
			}
			, function ( __kwargs, url ) {
				if (typeof url == 'undefined') {
					url=__kwargs.url;
					delete __kwargs.url;
				} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.url != 'undefined') {
					pyjs__exception_func_multiple_values('prefetch', 'url');
				}
				if (pyjs_options.arg_kwarg_unexpected_keyword) {
					for (var i in __kwargs) {
						pyjs__exception_func_unexpected_keyword('prefetch', i);
					}
				}
				var __r = [url];
				for (var pyjs__va_arg = 2;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
					__r.push(arguments[pyjs__va_arg]);
				}

				return __r;
			});
			cls_definition.setUrl = pyjs__bind_method(cls_instance, 'setUrl', function(url) {
				if (this.__is_instance__ === true) {
					var self = this;
					if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 2, 2, arguments.length+1);
				} else {
					var self = arguments[0];
					url = arguments[1];
					if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					if (pyjs_options.arg_count && arguments.length != 2) pyjs__exception_func_param(arguments.callee.__name__, 2, 2, arguments.length);
				}
				if (pyjs_options.arg_instance_type) {
					if (self.prototype.__md5__ !== 'b67a915619eb3be521abb51e39bc92f2') {
						if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
							pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
						}
					}
				}
				track={module:pyjamas.ui.Image, lineno:70};trackstack.push(track);
				track.module='pyjamas.ui.Image';
				track.lineno=70;
				track.lineno=71;
				pyjamas.ui.Image.DOM.setAttribute(self.getElement(), String('src'), url);
				trackstack.pop();track=trackstack.pop();trackstack.push(track);
				return null;
			}
			, function ( __kwargs, url ) {
				if (typeof url == 'undefined') {
					url=__kwargs.url;
					delete __kwargs.url;
				} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.url != 'undefined') {
					pyjs__exception_func_multiple_values('setUrl', 'url');
				}
				if (pyjs_options.arg_kwarg_unexpected_keyword) {
					for (var i in __kwargs) {
						pyjs__exception_func_unexpected_keyword('setUrl', i);
					}
				}
				var __r = [url];
				for (var pyjs__va_arg = 2;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
					__r.push(arguments[pyjs__va_arg]);
				}

				return __r;
			});
			return pyjs__class_function(cls_instance, cls_definition, 
			                            new Array(pyjamas.ui.Image.Widget));
		})();

	} catch (pyjs_attr_err) {throw pyjslib._errorMapping(pyjs_attr_err)};
return this;
}; /* end pyjamas.ui.Image */ 




pyjamas.ui.Image_loaded_fn = function() {
}

pyjamas.ui.Image_prepare_mod = function() {
    if ((typeof (module_load_request['pyjamas.ui.Image']) == 'undefined') ||
        (module_load_request['pyjamas.ui.Image'] < 2)) {
        module_load_request['pyjamas.ui.Image'] = 2;
    }
    var modnames = new pyjslib.List([
		new pyjslib.List([
			'pyjamas']),
		new pyjslib.List([
			'pyjamas.DOM',
			'pyjamas.ui']),
		new pyjslib.List([
			'pyjamas.ui.Event',
			'pyjamas.ui.MouseListener']),
		new pyjslib.List([
			'pyjamas.ui.Widget'])
	]);
    sys.overrides.update(new pyjslib.Dict({
		'mozilla.pyjslib': 'mozilla.pyjslib',
		'mozilla.pyjamas.DOM': 'mozilla.pyjamas.DOM'
	}));
    path = sys.loadpath;
    /*
    pyjslib.preload_app_modules(path, modnames, pyjamas.ui.Image_loaded_fn,
                                            0,
                                            null);
                                            //'pyjamas.ui.Image');
                                            */
    //alert("module ajax loaded fn called pyjamas.ui.Image");

    if (sys.appname != 'pyjamas.ui.Image')
    {
        if (module_load_request['pyjamas.ui.Image'] < 3) {
            module_load_request['pyjamas.ui.Image'] = 3;
        }
    }
}

//alert("module ajax loaded pyjamas.ui.Image");

pyjamas.ui.Image_prepare_mod();


// pyjamas.ui.Panel

// module libs (usually imported javascript)



// module code

pyjamas.ui.Panel = function (__mod_name__) {
	if(pyjamas.ui.Panel.__was_initialized__) return;
	pyjamas.ui.Panel.__was_initialized__ = true;
	if (__mod_name__ == null) __mod_name__ = 'pyjamas.ui.Panel';
	var __name__ = pyjamas.ui.Panel.__name__ = __mod_name__;
	pyjamas.ui.Panel.__track_lines__ = new Array();
	var Panel = pyjamas.ui.Panel;

		pyjamas.ui.Panel.__track_lines__[1] = "pyjamas.ui.Panel.py, line 1:\n    # Copyright 2006 James Tauber and contributors";
		pyjamas.ui.Panel.__track_lines__[14] = "pyjamas.ui.Panel.py, line 14:\n    from __pyjamas__ import console";
		pyjamas.ui.Panel.__track_lines__[15] = "pyjamas.ui.Panel.py, line 15:\n    from pyjamas import DOM";
		pyjamas.ui.Panel.__track_lines__[17] = "pyjamas.ui.Panel.py, line 17:\n    from pyjamas.ui.Widget import Widget";
		pyjamas.ui.Panel.__track_lines__[19] = "pyjamas.ui.Panel.py, line 19:\n    class Panel(Widget):";
		pyjamas.ui.Panel.__track_lines__[20] = "pyjamas.ui.Panel.py, line 20:\n    def __init__(self):";
		pyjamas.ui.Panel.__track_lines__[21] = "pyjamas.ui.Panel.py, line 21:\n    Widget.__init__(self)";
		pyjamas.ui.Panel.__track_lines__[22] = "pyjamas.ui.Panel.py, line 22:\n    self.children = []";
		pyjamas.ui.Panel.__track_lines__[24] = "pyjamas.ui.Panel.py, line 24:\n    def add(self):";
		pyjamas.ui.Panel.__track_lines__[25] = "pyjamas.ui.Panel.py, line 25:\n    console.error(\"This panel does not support no-arg add()\")";
		pyjamas.ui.Panel.__track_lines__[27] = "pyjamas.ui.Panel.py, line 27:\n    def clear(self):";
		pyjamas.ui.Panel.__track_lines__[29] = "pyjamas.ui.Panel.py, line 29:\n    children = []";
		pyjamas.ui.Panel.__track_lines__[30] = "pyjamas.ui.Panel.py, line 30:\n    for child in self.children:";
		pyjamas.ui.Panel.__track_lines__[31] = "pyjamas.ui.Panel.py, line 31:\n    children.append(child)";
		pyjamas.ui.Panel.__track_lines__[33] = "pyjamas.ui.Panel.py, line 33:\n    for child in children:";
		pyjamas.ui.Panel.__track_lines__[34] = "pyjamas.ui.Panel.py, line 34:\n    self.remove(child)";
		pyjamas.ui.Panel.__track_lines__[36] = "pyjamas.ui.Panel.py, line 36:\n    def disown(self, widget):";
		pyjamas.ui.Panel.__track_lines__[37] = "pyjamas.ui.Panel.py, line 37:\n    if widget.getParent() != self:";
		pyjamas.ui.Panel.__track_lines__[38] = "pyjamas.ui.Panel.py, line 38:\n    console.error(\"widget %o is not a child of this panel %o\", widget, self)";
		pyjamas.ui.Panel.__track_lines__[40] = "pyjamas.ui.Panel.py, line 40:\n    element = widget.getElement()";
		pyjamas.ui.Panel.__track_lines__[41] = "pyjamas.ui.Panel.py, line 41:\n    widget.setParent(None)";
		pyjamas.ui.Panel.__track_lines__[42] = "pyjamas.ui.Panel.py, line 42:\n    parentElement = DOM.getParent(element)";
		pyjamas.ui.Panel.__track_lines__[43] = "pyjamas.ui.Panel.py, line 43:\n    if parentElement:";
		pyjamas.ui.Panel.__track_lines__[44] = "pyjamas.ui.Panel.py, line 44:\n    DOM.removeChild(parentElement, element)";
		pyjamas.ui.Panel.__track_lines__[46] = "pyjamas.ui.Panel.py, line 46:\n    def adopt(self, widget, container):";
		pyjamas.ui.Panel.__track_lines__[47] = "pyjamas.ui.Panel.py, line 47:\n    if container:";
		pyjamas.ui.Panel.__track_lines__[48] = "pyjamas.ui.Panel.py, line 48:\n    widget.removeFromParent()";
		pyjamas.ui.Panel.__track_lines__[49] = "pyjamas.ui.Panel.py, line 49:\n    DOM.appendChild(container, widget.getElement())";
		pyjamas.ui.Panel.__track_lines__[50] = "pyjamas.ui.Panel.py, line 50:\n    widget.setParent(self)";
		pyjamas.ui.Panel.__track_lines__[52] = "pyjamas.ui.Panel.py, line 52:\n    def remove(self, widget):";
		pyjamas.ui.Panel.__track_lines__[53] = "pyjamas.ui.Panel.py, line 53:\n    pass";
		pyjamas.ui.Panel.__track_lines__[55] = "pyjamas.ui.Panel.py, line 55:\n    def doAttachChildren(self):";
		pyjamas.ui.Panel.__track_lines__[56] = "pyjamas.ui.Panel.py, line 56:\n    for child in self:";
		pyjamas.ui.Panel.__track_lines__[57] = "pyjamas.ui.Panel.py, line 57:\n    child.onAttach()";
		pyjamas.ui.Panel.__track_lines__[59] = "pyjamas.ui.Panel.py, line 59:\n    def doDetachChildren(self):";
		pyjamas.ui.Panel.__track_lines__[60] = "pyjamas.ui.Panel.py, line 60:\n    for child in self:";
		pyjamas.ui.Panel.__track_lines__[61] = "pyjamas.ui.Panel.py, line 61:\n    child.onDetach()";
		pyjamas.ui.Panel.__track_lines__[63] = "pyjamas.ui.Panel.py, line 63:\n    def __iter__(self):";
		pyjamas.ui.Panel.__track_lines__[64] = "pyjamas.ui.Panel.py, line 64:\n    return self.children.__iter__()";
	try {
		track.module='pyjamas.ui.Panel';
		track.lineno=1;
		track.lineno=14;
		track.lineno=15;
		modules['pyjamas'] = pyjamas();
		pyjslib.import_module(sys.loadpath, 'pyjamas.ui.Panel', 'pyjamas', 0, false);
		track.module='pyjamas.ui.Panel';

		modules['pyjamas'] = pyjamas();
		pyjslib.import_module(sys.loadpath, 'pyjamas.ui.Panel', 'pyjamas', 0, false);
		track.module='pyjamas.ui.Panel';

		modules['pyjamas.DOM'] = pyjamas.DOM();
		pyjslib.import_module(sys.loadpath, 'pyjamas.ui.Panel', 'pyjamas.DOM', 0, false);
		track.module='pyjamas.ui.Panel';

		pyjamas.ui.Panel.DOM = pyjamas.DOM;
		track.lineno=17;
		modules['pyjamas'] = pyjamas();
		pyjslib.import_module(sys.loadpath, 'pyjamas.ui.Panel', 'pyjamas', 0, false);
		track.module='pyjamas.ui.Panel';

		modules['pyjamas.ui'] = pyjamas.ui();
		pyjslib.import_module(sys.loadpath, 'pyjamas.ui.Panel', 'pyjamas.ui', 0, false);
		track.module='pyjamas.ui.Panel';

		modules['pyjamas.ui.Widget'] = pyjamas.ui.Widget();
		pyjslib.import_module(sys.loadpath, 'pyjamas.ui.Panel', 'pyjamas.ui.Widget', 0, false);
		track.module='pyjamas.ui.Panel';

		pyjamas.ui.Panel.Widget = pyjamas.ui.Widget.Widget;
		track.lineno=19;
		pyjamas.ui.Panel.Panel = (function(){
			var cls_instance = pyjs__class_instance('Panel');
			var cls_definition = new Object();
			cls_definition.__md5__ = '9fdb2bdcd500caa24bbd04b576cea3f9';
			cls_definition.__init__ = pyjs__bind_method(cls_instance, '__init__', function() {
				if (this.__is_instance__ === true) {
					var self = this;
					if (pyjs_options.arg_count && arguments.length != 0) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length+1);
				} else {
					var self = arguments[0];
					if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length);
				}
				if (pyjs_options.arg_instance_type) {
					if (self.prototype.__md5__ !== '9fdb2bdcd500caa24bbd04b576cea3f9') {
						if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
							pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
						}
					}
				}
				track={module:pyjamas.ui.Panel, lineno:20};trackstack.push(track);
				track.module='pyjamas.ui.Panel';
				track.lineno=20;
				track.lineno=21;
				pyjamas.ui.Panel.Widget.__init__(self);
				track.lineno=22;
				self.children = new pyjslib.List([]);
				trackstack.pop();track=trackstack.pop();trackstack.push(track);
				return null;
			}
			, function ( __kwargs ) {
				if (pyjs_options.arg_kwarg_unexpected_keyword) {
					for (var i in __kwargs) {
						pyjs__exception_func_unexpected_keyword('__init__', i);
					}
				}
				var __r = [];
				for (var pyjs__va_arg = 1;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
					__r.push(arguments[pyjs__va_arg]);
				}

				return __r;
			});
			cls_definition.add = pyjs__bind_method(cls_instance, 'add', function() {
				if (this.__is_instance__ === true) {
					var self = this;
					if (pyjs_options.arg_count && arguments.length != 0) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length+1);
				} else {
					var self = arguments[0];
					if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length);
				}
				if (pyjs_options.arg_instance_type) {
					if (self.prototype.__md5__ !== '9fdb2bdcd500caa24bbd04b576cea3f9') {
						if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
							pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
						}
					}
				}
				track={module:pyjamas.ui.Panel, lineno:24};trackstack.push(track);
				track.module='pyjamas.ui.Panel';
				track.lineno=24;
				track.lineno=25;
				console.error(String('This panel does not support no-arg add()'));
				trackstack.pop();track=trackstack.pop();trackstack.push(track);
				return null;
			}
			, function ( __kwargs ) {
				if (pyjs_options.arg_kwarg_unexpected_keyword) {
					for (var i in __kwargs) {
						pyjs__exception_func_unexpected_keyword('add', i);
					}
				}
				var __r = [];
				for (var pyjs__va_arg = 1;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
					__r.push(arguments[pyjs__va_arg]);
				}

				return __r;
			});
			cls_definition.clear = pyjs__bind_method(cls_instance, 'clear', function() {
				if (this.__is_instance__ === true) {
					var self = this;
					if (pyjs_options.arg_count && arguments.length != 0) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length+1);
				} else {
					var self = arguments[0];
					if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length);
				}
				if (pyjs_options.arg_instance_type) {
					if (self.prototype.__md5__ !== '9fdb2bdcd500caa24bbd04b576cea3f9') {
						if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
							pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
						}
					}
				}
				track={module:pyjamas.ui.Panel, lineno:27};trackstack.push(track);
				track.module='pyjamas.ui.Panel';
				track.lineno=27;
				track.lineno=29;
				var children = new pyjslib.List([]);
				track.lineno=30;
				var pyjs__trackstack_size_1=trackstack.length;
				var __child = self.children.__iter__();
				try {
					while (true) {
						var child = __child.next();
						
						track.lineno=31;
						children.append(child);
					}
				} catch (e) {
					if (e.__name__ != 'StopIteration') {
						throw e;
					}
				}
				if (trackstack.length > pyjs__trackstack_size_1) {
					trackstack = trackstack.slice(0,pyjs__trackstack_size_1);
					track = trackstack.slice(-1)[0];
				}
				track.module='pyjamas.ui.Panel';
				track.lineno=33;
				var pyjs__trackstack_size_1=trackstack.length;
				var __child = children.__iter__();
				try {
					while (true) {
						var child = __child.next();
						
						track.lineno=34;
						self.remove(child);
					}
				} catch (e) {
					if (e.__name__ != 'StopIteration') {
						throw e;
					}
				}
				if (trackstack.length > pyjs__trackstack_size_1) {
					trackstack = trackstack.slice(0,pyjs__trackstack_size_1);
					track = trackstack.slice(-1)[0];
				}
				track.module='pyjamas.ui.Panel';
				trackstack.pop();track=trackstack.pop();trackstack.push(track);
				return null;
			}
			, function ( __kwargs ) {
				if (pyjs_options.arg_kwarg_unexpected_keyword) {
					for (var i in __kwargs) {
						pyjs__exception_func_unexpected_keyword('clear', i);
					}
				}
				var __r = [];
				for (var pyjs__va_arg = 1;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
					__r.push(arguments[pyjs__va_arg]);
				}

				return __r;
			});
			cls_definition.disown = pyjs__bind_method(cls_instance, 'disown', function(widget) {
				if (this.__is_instance__ === true) {
					var self = this;
					if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 2, 2, arguments.length+1);
				} else {
					var self = arguments[0];
					widget = arguments[1];
					if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					if (pyjs_options.arg_count && arguments.length != 2) pyjs__exception_func_param(arguments.callee.__name__, 2, 2, arguments.length);
				}
				if (pyjs_options.arg_instance_type) {
					if (self.prototype.__md5__ !== '9fdb2bdcd500caa24bbd04b576cea3f9') {
						if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
							pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
						}
					}
				}
				track={module:pyjamas.ui.Panel, lineno:36};trackstack.push(track);
				track.module='pyjamas.ui.Panel';
				track.lineno=36;
				track.lineno=37;
				if (pyjslib.bool((widget.getParent() != self))) {
					track.lineno=38;
					console.error(String('widget %o is not a child of this panel %o'), widget, self);
				}
				else {
					track.lineno=40;
					var element = widget.getElement();
					track.lineno=41;
					widget.setParent(null);
					track.lineno=42;
					var parentElement = pyjamas.ui.Panel.DOM.getParent(element);
					track.lineno=43;
					if (pyjslib.bool(parentElement)) {
						track.lineno=44;
						pyjamas.ui.Panel.DOM.removeChild(parentElement, element);
					}
				}
				trackstack.pop();track=trackstack.pop();trackstack.push(track);
				return null;
			}
			, function ( __kwargs, widget ) {
				if (typeof widget == 'undefined') {
					widget=__kwargs.widget;
					delete __kwargs.widget;
				} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.widget != 'undefined') {
					pyjs__exception_func_multiple_values('disown', 'widget');
				}
				if (pyjs_options.arg_kwarg_unexpected_keyword) {
					for (var i in __kwargs) {
						pyjs__exception_func_unexpected_keyword('disown', i);
					}
				}
				var __r = [widget];
				for (var pyjs__va_arg = 2;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
					__r.push(arguments[pyjs__va_arg]);
				}

				return __r;
			});
			cls_definition.adopt = pyjs__bind_method(cls_instance, 'adopt', function(widget, container) {
				if (this.__is_instance__ === true) {
					var self = this;
					if (pyjs_options.arg_count && arguments.length != 2) pyjs__exception_func_param(arguments.callee.__name__, 3, 3, arguments.length+1);
				} else {
					var self = arguments[0];
					widget = arguments[1];
					container = arguments[2];
					if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					if (pyjs_options.arg_count && arguments.length != 3) pyjs__exception_func_param(arguments.callee.__name__, 3, 3, arguments.length);
				}
				if (pyjs_options.arg_instance_type) {
					if (self.prototype.__md5__ !== '9fdb2bdcd500caa24bbd04b576cea3f9') {
						if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
							pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
						}
					}
				}
				track={module:pyjamas.ui.Panel, lineno:46};trackstack.push(track);
				track.module='pyjamas.ui.Panel';
				track.lineno=46;
				track.lineno=47;
				if (pyjslib.bool(container)) {
					track.lineno=48;
					widget.removeFromParent();
					track.lineno=49;
					pyjamas.ui.Panel.DOM.appendChild(container, widget.getElement());
				}
				track.lineno=50;
				widget.setParent(self);
				trackstack.pop();track=trackstack.pop();trackstack.push(track);
				return null;
			}
			, function ( __kwargs, widget, container ) {
				if (typeof widget == 'undefined') {
					widget=__kwargs.widget;
					delete __kwargs.widget;
				} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.widget != 'undefined') {
					pyjs__exception_func_multiple_values('adopt', 'widget');
				}
				if (typeof container == 'undefined') {
					container=__kwargs.container;
					delete __kwargs.container;
				} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.container != 'undefined') {
					pyjs__exception_func_multiple_values('adopt', 'container');
				}
				if (pyjs_options.arg_kwarg_unexpected_keyword) {
					for (var i in __kwargs) {
						pyjs__exception_func_unexpected_keyword('adopt', i);
					}
				}
				var __r = [widget, container];
				for (var pyjs__va_arg = 3;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
					__r.push(arguments[pyjs__va_arg]);
				}

				return __r;
			});
			cls_definition.remove = pyjs__bind_method(cls_instance, 'remove', function(widget) {
				if (this.__is_instance__ === true) {
					var self = this;
					if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 2, 2, arguments.length+1);
				} else {
					var self = arguments[0];
					widget = arguments[1];
					if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					if (pyjs_options.arg_count && arguments.length != 2) pyjs__exception_func_param(arguments.callee.__name__, 2, 2, arguments.length);
				}
				if (pyjs_options.arg_instance_type) {
					if (self.prototype.__md5__ !== '9fdb2bdcd500caa24bbd04b576cea3f9') {
						if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
							pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
						}
					}
				}
				track={module:pyjamas.ui.Panel, lineno:52};trackstack.push(track);
				track.module='pyjamas.ui.Panel';
				track.lineno=52;
				track.lineno=53;
				trackstack.pop();track=trackstack.pop();trackstack.push(track);
				return null;
			}
			, function ( __kwargs, widget ) {
				if (typeof widget == 'undefined') {
					widget=__kwargs.widget;
					delete __kwargs.widget;
				} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.widget != 'undefined') {
					pyjs__exception_func_multiple_values('remove', 'widget');
				}
				if (pyjs_options.arg_kwarg_unexpected_keyword) {
					for (var i in __kwargs) {
						pyjs__exception_func_unexpected_keyword('remove', i);
					}
				}
				var __r = [widget];
				for (var pyjs__va_arg = 2;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
					__r.push(arguments[pyjs__va_arg]);
				}

				return __r;
			});
			cls_definition.doAttachChildren = pyjs__bind_method(cls_instance, 'doAttachChildren', function() {
				if (this.__is_instance__ === true) {
					var self = this;
					if (pyjs_options.arg_count && arguments.length != 0) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length+1);
				} else {
					var self = arguments[0];
					if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length);
				}
				if (pyjs_options.arg_instance_type) {
					if (self.prototype.__md5__ !== '9fdb2bdcd500caa24bbd04b576cea3f9') {
						if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
							pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
						}
					}
				}
				track={module:pyjamas.ui.Panel, lineno:55};trackstack.push(track);
				track.module='pyjamas.ui.Panel';
				track.lineno=55;
				track.lineno=56;
				var pyjs__trackstack_size_1=trackstack.length;
				var __child = self.__iter__();
				try {
					while (true) {
						var child = __child.next();
						
						track.lineno=57;
						child.onAttach();
					}
				} catch (e) {
					if (e.__name__ != 'StopIteration') {
						throw e;
					}
				}
				if (trackstack.length > pyjs__trackstack_size_1) {
					trackstack = trackstack.slice(0,pyjs__trackstack_size_1);
					track = trackstack.slice(-1)[0];
				}
				track.module='pyjamas.ui.Panel';
				trackstack.pop();track=trackstack.pop();trackstack.push(track);
				return null;
			}
			, function ( __kwargs ) {
				if (pyjs_options.arg_kwarg_unexpected_keyword) {
					for (var i in __kwargs) {
						pyjs__exception_func_unexpected_keyword('doAttachChildren', i);
					}
				}
				var __r = [];
				for (var pyjs__va_arg = 1;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
					__r.push(arguments[pyjs__va_arg]);
				}

				return __r;
			});
			cls_definition.doDetachChildren = pyjs__bind_method(cls_instance, 'doDetachChildren', function() {
				if (this.__is_instance__ === true) {
					var self = this;
					if (pyjs_options.arg_count && arguments.length != 0) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length+1);
				} else {
					var self = arguments[0];
					if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length);
				}
				if (pyjs_options.arg_instance_type) {
					if (self.prototype.__md5__ !== '9fdb2bdcd500caa24bbd04b576cea3f9') {
						if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
							pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
						}
					}
				}
				track={module:pyjamas.ui.Panel, lineno:59};trackstack.push(track);
				track.module='pyjamas.ui.Panel';
				track.lineno=59;
				track.lineno=60;
				var pyjs__trackstack_size_1=trackstack.length;
				var __child = self.__iter__();
				try {
					while (true) {
						var child = __child.next();
						
						track.lineno=61;
						child.onDetach();
					}
				} catch (e) {
					if (e.__name__ != 'StopIteration') {
						throw e;
					}
				}
				if (trackstack.length > pyjs__trackstack_size_1) {
					trackstack = trackstack.slice(0,pyjs__trackstack_size_1);
					track = trackstack.slice(-1)[0];
				}
				track.module='pyjamas.ui.Panel';
				trackstack.pop();track=trackstack.pop();trackstack.push(track);
				return null;
			}
			, function ( __kwargs ) {
				if (pyjs_options.arg_kwarg_unexpected_keyword) {
					for (var i in __kwargs) {
						pyjs__exception_func_unexpected_keyword('doDetachChildren', i);
					}
				}
				var __r = [];
				for (var pyjs__va_arg = 1;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
					__r.push(arguments[pyjs__va_arg]);
				}

				return __r;
			});
			cls_definition.__iter__ = pyjs__bind_method(cls_instance, '__iter__', function() {
				if (this.__is_instance__ === true) {
					var self = this;
					if (pyjs_options.arg_count && arguments.length != 0) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length+1);
				} else {
					var self = arguments[0];
					if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length);
				}
				if (pyjs_options.arg_instance_type) {
					if (self.prototype.__md5__ !== '9fdb2bdcd500caa24bbd04b576cea3f9') {
						if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
							pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
						}
					}
				}
				track={module:pyjamas.ui.Panel, lineno:63};trackstack.push(track);
				track.module='pyjamas.ui.Panel';
				track.lineno=63;
				track.lineno=64;
				track.lineno=64;
				var pyjs__ret = self.children.__iter__();
				trackstack.pop();track=trackstack.pop();trackstack.push(track);
				return pyjs__ret;
			}
			, function ( __kwargs ) {
				if (pyjs_options.arg_kwarg_unexpected_keyword) {
					for (var i in __kwargs) {
						pyjs__exception_func_unexpected_keyword('__iter__', i);
					}
				}
				var __r = [];
				for (var pyjs__va_arg = 1;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
					__r.push(arguments[pyjs__va_arg]);
				}

				return __r;
			});
			return pyjs__class_function(cls_instance, cls_definition, 
			                            new Array(pyjamas.ui.Panel.Widget));
		})();

	} catch (pyjs_attr_err) {throw pyjslib._errorMapping(pyjs_attr_err)};
return this;
}; /* end pyjamas.ui.Panel */ 




pyjamas.ui.Panel_loaded_fn = function() {
}

pyjamas.ui.Panel_prepare_mod = function() {
    if ((typeof (module_load_request['pyjamas.ui.Panel']) == 'undefined') ||
        (module_load_request['pyjamas.ui.Panel'] < 2)) {
        module_load_request['pyjamas.ui.Panel'] = 2;
    }
    var modnames = new pyjslib.List([
		new pyjslib.List([
			'pyjamas']),
		new pyjslib.List([
			'pyjamas.DOM',
			'pyjamas.ui']),
		new pyjslib.List([
			]),
		new pyjslib.List([
			'pyjamas.ui.Widget'])
	]);
    sys.overrides.update(new pyjslib.Dict({
		'mozilla.pyjslib': 'mozilla.pyjslib',
		'mozilla.pyjamas.DOM': 'mozilla.pyjamas.DOM'
	}));
    path = sys.loadpath;
    /*
    pyjslib.preload_app_modules(path, modnames, pyjamas.ui.Panel_loaded_fn,
                                            0,
                                            null);
                                            //'pyjamas.ui.Panel');
                                            */
    //alert("module ajax loaded fn called pyjamas.ui.Panel");

    if (sys.appname != 'pyjamas.ui.Panel')
    {
        if (module_load_request['pyjamas.ui.Panel'] < 3) {
            module_load_request['pyjamas.ui.Panel'] = 3;
        }
    }
}

//alert("module ajax loaded pyjamas.ui.Panel");

pyjamas.ui.Panel_prepare_mod();


// pyjamas.Canvas2D

// module libs (usually imported javascript)



// module code

pyjamas.Canvas2D = function (__mod_name__) {
	if(pyjamas.Canvas2D.__was_initialized__) return;
	pyjamas.Canvas2D.__was_initialized__ = true;
	if (__mod_name__ == null) __mod_name__ = 'pyjamas.Canvas2D';
	var __name__ = pyjamas.Canvas2D.__name__ = __mod_name__;
	pyjamas.Canvas2D.__track_lines__ = new Array();
	var Canvas2D = pyjamas.Canvas2D;

		pyjamas.Canvas2D.__track_lines__[1] = "pyjamas.Canvas2D.py, line 1:\n    # Canvas wrapper component for Pyjamas";
		pyjamas.Canvas2D.__track_lines__[12] = "pyjamas.Canvas2D.py, line 12:\n    from pyjamas import DOM";
		pyjamas.Canvas2D.__track_lines__[13] = "pyjamas.Canvas2D.py, line 13:\n    from pyjamas.ui.Image import Image";
		pyjamas.Canvas2D.__track_lines__[14] = "pyjamas.Canvas2D.py, line 14:\n    from pyjamas.ui.Widget import Widget";
		pyjamas.Canvas2D.__track_lines__[15] = "pyjamas.Canvas2D.py, line 15:\n    from pyjamas.ui import Event";
		pyjamas.Canvas2D.__track_lines__[16] = "pyjamas.Canvas2D.py, line 16:\n    from pyjamas.ui import MouseListener";
		pyjamas.Canvas2D.__track_lines__[17] = "pyjamas.Canvas2D.py, line 17:\n    from pyjamas.ui import KeyboardListener";
		pyjamas.Canvas2D.__track_lines__[18] = "pyjamas.Canvas2D.py, line 18:\n    from pyjamas.ui import Focus";
		pyjamas.Canvas2D.__track_lines__[19] = "pyjamas.Canvas2D.py, line 19:\n    from pyjamas.ui import FocusListener";
		pyjamas.Canvas2D.__track_lines__[21] = "pyjamas.Canvas2D.py, line 21:\n    class Canvas(Widget):";
		pyjamas.Canvas2D.__track_lines__[22] = "pyjamas.Canvas2D.py, line 22:\n    def __init__(self, width, height):";
		pyjamas.Canvas2D.__track_lines__[23] = "pyjamas.Canvas2D.py, line 23:\n    Widget.__init__(self)";
		pyjamas.Canvas2D.__track_lines__[24] = "pyjamas.Canvas2D.py, line 24:\n    self.context = None";
		pyjamas.Canvas2D.__track_lines__[26] = "pyjamas.Canvas2D.py, line 26:\n    self.setElement(DOM.createDiv())";
		pyjamas.Canvas2D.__track_lines__[27] = "pyjamas.Canvas2D.py, line 27:\n    canvas = DOM.createElement(\"canvas\")";
		pyjamas.Canvas2D.__track_lines__[28] = "pyjamas.Canvas2D.py, line 28:\n    self.setWidth(width)";
		pyjamas.Canvas2D.__track_lines__[29] = "pyjamas.Canvas2D.py, line 29:\n    self.setHeight(height)";
		pyjamas.Canvas2D.__track_lines__[31] = "pyjamas.Canvas2D.py, line 31:\n    canvas.width=width";
		pyjamas.Canvas2D.__track_lines__[32] = "pyjamas.Canvas2D.py, line 32:\n    canvas.height=height";
		pyjamas.Canvas2D.__track_lines__[34] = "pyjamas.Canvas2D.py, line 34:\n    DOM.appendChild(self.getElement(), canvas)";
		pyjamas.Canvas2D.__track_lines__[35] = "pyjamas.Canvas2D.py, line 35:\n    self.setStyleName(\"gwt-Canvas\")";
		pyjamas.Canvas2D.__track_lines__[37] = "pyjamas.Canvas2D.py, line 37:\n    self.init()";
		pyjamas.Canvas2D.__track_lines__[39] = "pyjamas.Canvas2D.py, line 39:\n    self.context.fillStyle = \"black\"";
		pyjamas.Canvas2D.__track_lines__[40] = "pyjamas.Canvas2D.py, line 40:\n    self.context.strokeStyle = \"black\"";
		pyjamas.Canvas2D.__track_lines__[42] = "pyjamas.Canvas2D.py, line 42:\n    self.focusable = None";
		pyjamas.Canvas2D.__track_lines__[43] = "pyjamas.Canvas2D.py, line 43:\n    self.focusable = Focus.createFocusable()";
		pyjamas.Canvas2D.__track_lines__[45] = "pyjamas.Canvas2D.py, line 45:\n    self.focusListeners = []";
		pyjamas.Canvas2D.__track_lines__[46] = "pyjamas.Canvas2D.py, line 46:\n    self.clickListeners = []";
		pyjamas.Canvas2D.__track_lines__[47] = "pyjamas.Canvas2D.py, line 47:\n    self.mouseListeners = []";
		pyjamas.Canvas2D.__track_lines__[48] = "pyjamas.Canvas2D.py, line 48:\n    self.keyboardListeners = []";
		pyjamas.Canvas2D.__track_lines__[50] = "pyjamas.Canvas2D.py, line 50:\n    DOM.appendChild(self.getElement(), self.focusable)";
		pyjamas.Canvas2D.__track_lines__[51] = "pyjamas.Canvas2D.py, line 51:\n    DOM.sinkEvents(canvas, Event.ONCLICK | Event.MOUSEEVENTS | DOM.getEventsSunk(canvas))";
		pyjamas.Canvas2D.__track_lines__[52] = "pyjamas.Canvas2D.py, line 52:\n    DOM.sinkEvents(self.focusable, Event.FOCUSEVENTS | Event.KEYEVENTS)";
		pyjamas.Canvas2D.__track_lines__[54] = "pyjamas.Canvas2D.py, line 54:\n    def addClickListener(self, listener):";
		pyjamas.Canvas2D.__track_lines__[55] = "pyjamas.Canvas2D.py, line 55:\n    self.clickListeners.append(listener)";
		pyjamas.Canvas2D.__track_lines__[57] = "pyjamas.Canvas2D.py, line 57:\n    def addMouseListener(self, listener):";
		pyjamas.Canvas2D.__track_lines__[58] = "pyjamas.Canvas2D.py, line 58:\n    self.mouseListeners.append(listener)";
		pyjamas.Canvas2D.__track_lines__[60] = "pyjamas.Canvas2D.py, line 60:\n    def addFocusListener(self, listener):";
		pyjamas.Canvas2D.__track_lines__[61] = "pyjamas.Canvas2D.py, line 61:\n    self.focusListeners.append(listener)";
		pyjamas.Canvas2D.__track_lines__[63] = "pyjamas.Canvas2D.py, line 63:\n    def addKeyboardListener(self, listener):";
		pyjamas.Canvas2D.__track_lines__[64] = "pyjamas.Canvas2D.py, line 64:\n    self.keyboardListeners.append(listener)";
		pyjamas.Canvas2D.__track_lines__[66] = "pyjamas.Canvas2D.py, line 66:\n    def onBrowserEvent(self, event):";
		pyjamas.Canvas2D.__track_lines__[67] = "pyjamas.Canvas2D.py, line 67:\n    type = DOM.eventGetType(event)";
		pyjamas.Canvas2D.__track_lines__[69] = "pyjamas.Canvas2D.py, line 69:\n    if type == \"click\":";
		pyjamas.Canvas2D.__track_lines__[70] = "pyjamas.Canvas2D.py, line 70:\n    for listener in self.clickListeners:";
		pyjamas.Canvas2D.__track_lines__[71] = "pyjamas.Canvas2D.py, line 71:\n    if hasattr(listener, \'onClick\'): listener.onClick(self)";
		pyjamas.Canvas2D.__track_lines__[72] = "pyjamas.Canvas2D.py, line 72:\n    else: listener(self, event)";
		pyjamas.Canvas2D.__track_lines__[74] = "pyjamas.Canvas2D.py, line 74:\n    FocusListener.fireFocusEvent(self.focusListeners, self, event)";
		pyjamas.Canvas2D.__track_lines__[76] = "pyjamas.Canvas2D.py, line 76:\n    KeyboardListener.fireKeyboardEvent(self.keyboardListeners, self, event)";
		pyjamas.Canvas2D.__track_lines__[78] = "pyjamas.Canvas2D.py, line 78:\n    def removeClickListener(self, listener):";
		pyjamas.Canvas2D.__track_lines__[79] = "pyjamas.Canvas2D.py, line 79:\n    self.clickListeners.remove(listener)";
		pyjamas.Canvas2D.__track_lines__[81] = "pyjamas.Canvas2D.py, line 81:\n    def removeMouseListener(self, listener):";
		pyjamas.Canvas2D.__track_lines__[82] = "pyjamas.Canvas2D.py, line 82:\n    self.mouseListeners.remove(listener)";
		pyjamas.Canvas2D.__track_lines__[84] = "pyjamas.Canvas2D.py, line 84:\n    def removeFocusListener(self, listener):";
		pyjamas.Canvas2D.__track_lines__[85] = "pyjamas.Canvas2D.py, line 85:\n    self.focusListeners.remove(listener)";
		pyjamas.Canvas2D.__track_lines__[87] = "pyjamas.Canvas2D.py, line 87:\n    def removeKeyboardListener(self, listener):";
		pyjamas.Canvas2D.__track_lines__[88] = "pyjamas.Canvas2D.py, line 88:\n    self.keyboardListeners.remove(listener)";
		pyjamas.Canvas2D.__track_lines__[90] = "pyjamas.Canvas2D.py, line 90:\n    def setFocus(self, focused):";
		pyjamas.Canvas2D.__track_lines__[91] = "pyjamas.Canvas2D.py, line 91:\n    if (focused):";
		pyjamas.Canvas2D.__track_lines__[92] = "pyjamas.Canvas2D.py, line 92:\n    Focus.focus(self.focusable)";
		pyjamas.Canvas2D.__track_lines__[94] = "pyjamas.Canvas2D.py, line 94:\n    Focus.blur(self.focusable)";
		pyjamas.Canvas2D.__track_lines__[96] = "pyjamas.Canvas2D.py, line 96:\n    def getContext(self):";
		pyjamas.Canvas2D.__track_lines__[97] = "pyjamas.Canvas2D.py, line 97:\n    return self.context";
		pyjamas.Canvas2D.__track_lines__[99] = "pyjamas.Canvas2D.py, line 99:\n    def isEmulation(self):";
		pyjamas.Canvas2D.__track_lines__[102] = "pyjamas.Canvas2D.py, line 100:\n    JS(\"\"\" ... \"\"\")";
		pyjamas.Canvas2D.__track_lines__[104] = "pyjamas.Canvas2D.py, line 104:\n    def init(self):";
		pyjamas.Canvas2D.__track_lines__[160] = "pyjamas.Canvas2D.py, line 105:\n    JS(\"\"\" ... \"\"\")";
		pyjamas.Canvas2D.__track_lines__[162] = "pyjamas.Canvas2D.py, line 162:\n    class CanvasImage(Image):";
		pyjamas.Canvas2D.__track_lines__[163] = "pyjamas.Canvas2D.py, line 163:\n    def __init__(self, url=\"\", load_listener = None):";
		pyjamas.Canvas2D.__track_lines__[164] = "pyjamas.Canvas2D.py, line 164:\n    Image.__init__(self, url)";
		pyjamas.Canvas2D.__track_lines__[165] = "pyjamas.Canvas2D.py, line 165:\n    if load_listener:";
		pyjamas.Canvas2D.__track_lines__[166] = "pyjamas.Canvas2D.py, line 166:\n    self.addLoadListener(load_listener)";
		pyjamas.Canvas2D.__track_lines__[167] = "pyjamas.Canvas2D.py, line 167:\n    self.onAttach()";
		pyjamas.Canvas2D.__track_lines__[169] = "pyjamas.Canvas2D.py, line 169:\n    def isLoaded(self):";
		pyjamas.Canvas2D.__track_lines__[170] = "pyjamas.Canvas2D.py, line 170:\n    return self.getElement().complete";
		pyjamas.Canvas2D.__track_lines__[173] = "pyjamas.Canvas2D.py, line 173:\n    class ImageLoadListener:";
		pyjamas.Canvas2D.__track_lines__[174] = "pyjamas.Canvas2D.py, line 174:\n    def __init__(self, listener = None):";
		pyjamas.Canvas2D.__track_lines__[175] = "pyjamas.Canvas2D.py, line 175:\n    self.wait_list = []";
		pyjamas.Canvas2D.__track_lines__[176] = "pyjamas.Canvas2D.py, line 176:\n    self.loadListeners = []";
		pyjamas.Canvas2D.__track_lines__[178] = "pyjamas.Canvas2D.py, line 178:\n    if listener:";
		pyjamas.Canvas2D.__track_lines__[179] = "pyjamas.Canvas2D.py, line 179:\n    self.addLoadListener(listener)";
		pyjamas.Canvas2D.__track_lines__[181] = "pyjamas.Canvas2D.py, line 181:\n    def add(self, sender):";
		pyjamas.Canvas2D.__track_lines__[182] = "pyjamas.Canvas2D.py, line 182:\n    self.wait_list.append(sender)";
		pyjamas.Canvas2D.__track_lines__[183] = "pyjamas.Canvas2D.py, line 183:\n    sender.addLoadListener(self)";
		pyjamas.Canvas2D.__track_lines__[185] = "pyjamas.Canvas2D.py, line 185:\n    def addLoadListener(self, listener):";
		pyjamas.Canvas2D.__track_lines__[186] = "pyjamas.Canvas2D.py, line 186:\n    self.loadListeners.append(listener)";
		pyjamas.Canvas2D.__track_lines__[188] = "pyjamas.Canvas2D.py, line 188:\n    def isLoaded(self):";
		pyjamas.Canvas2D.__track_lines__[189] = "pyjamas.Canvas2D.py, line 189:\n    if len(self.wait_list):";
		pyjamas.Canvas2D.__track_lines__[190] = "pyjamas.Canvas2D.py, line 190:\n    return False";
		pyjamas.Canvas2D.__track_lines__[191] = "pyjamas.Canvas2D.py, line 191:\n    return True";
		pyjamas.Canvas2D.__track_lines__[193] = "pyjamas.Canvas2D.py, line 193:\n    def onError(self, sender):";
		pyjamas.Canvas2D.__track_lines__[194] = "pyjamas.Canvas2D.py, line 194:\n    for listener in self.loadListeners:";
		pyjamas.Canvas2D.__track_lines__[195] = "pyjamas.Canvas2D.py, line 195:\n    listener.onError(sender)";
		pyjamas.Canvas2D.__track_lines__[197] = "pyjamas.Canvas2D.py, line 197:\n    def onLoad(self, sender):";
		pyjamas.Canvas2D.__track_lines__[198] = "pyjamas.Canvas2D.py, line 198:\n    self.wait_list.remove(sender)";
		pyjamas.Canvas2D.__track_lines__[200] = "pyjamas.Canvas2D.py, line 200:\n    if self.isLoaded():";
		pyjamas.Canvas2D.__track_lines__[201] = "pyjamas.Canvas2D.py, line 201:\n    for listener in self.loadListeners:";
		pyjamas.Canvas2D.__track_lines__[202] = "pyjamas.Canvas2D.py, line 202:\n    listener.onLoad(self)";
	try {
		track.module='pyjamas.Canvas2D';
		track.lineno=1;
		track.lineno=12;
		modules['pyjamas'] = pyjamas();
		pyjslib.import_module(sys.loadpath, 'pyjamas.Canvas2D', 'pyjamas', 0, false);
		track.module='pyjamas.Canvas2D';

		modules['pyjamas'] = pyjamas();
		pyjslib.import_module(sys.loadpath, 'pyjamas.Canvas2D', 'pyjamas', 0, false);
		track.module='pyjamas.Canvas2D';

		modules['pyjamas.DOM'] = pyjamas.DOM();
		pyjslib.import_module(sys.loadpath, 'pyjamas.Canvas2D', 'pyjamas.DOM', 0, false);
		track.module='pyjamas.Canvas2D';

		pyjamas.Canvas2D.DOM = pyjamas.DOM;
		track.lineno=13;
		modules['pyjamas'] = pyjamas();
		pyjslib.import_module(sys.loadpath, 'pyjamas.Canvas2D', 'pyjamas', 0, false);
		track.module='pyjamas.Canvas2D';

		modules['pyjamas.ui'] = pyjamas.ui();
		pyjslib.import_module(sys.loadpath, 'pyjamas.Canvas2D', 'pyjamas.ui', 0, false);
		track.module='pyjamas.Canvas2D';

		modules['pyjamas.ui.Image'] = pyjamas.ui.Image();
		pyjslib.import_module(sys.loadpath, 'pyjamas.Canvas2D', 'pyjamas.ui.Image', 0, false);
		track.module='pyjamas.Canvas2D';

		pyjamas.Canvas2D.Image = pyjamas.ui.Image.Image;
		track.lineno=14;
		modules['pyjamas'] = pyjamas();
		pyjslib.import_module(sys.loadpath, 'pyjamas.Canvas2D', 'pyjamas', 0, false);
		track.module='pyjamas.Canvas2D';

		modules['pyjamas.ui'] = pyjamas.ui();
		pyjslib.import_module(sys.loadpath, 'pyjamas.Canvas2D', 'pyjamas.ui', 0, false);
		track.module='pyjamas.Canvas2D';

		modules['pyjamas.ui.Widget'] = pyjamas.ui.Widget();
		pyjslib.import_module(sys.loadpath, 'pyjamas.Canvas2D', 'pyjamas.ui.Widget', 0, false);
		track.module='pyjamas.Canvas2D';

		pyjamas.Canvas2D.Widget = pyjamas.ui.Widget.Widget;
		track.lineno=15;
		modules['pyjamas'] = pyjamas();
		pyjslib.import_module(sys.loadpath, 'pyjamas.Canvas2D', 'pyjamas', 0, false);
		track.module='pyjamas.Canvas2D';

		modules['pyjamas.ui'] = pyjamas.ui();
		pyjslib.import_module(sys.loadpath, 'pyjamas.Canvas2D', 'pyjamas.ui', 0, false);
		track.module='pyjamas.Canvas2D';

		modules['pyjamas'] = pyjamas();
		pyjslib.import_module(sys.loadpath, 'pyjamas.Canvas2D', 'pyjamas', 0, false);
		track.module='pyjamas.Canvas2D';

		modules['pyjamas.ui'] = pyjamas.ui();
		pyjslib.import_module(sys.loadpath, 'pyjamas.Canvas2D', 'pyjamas.ui', 0, false);
		track.module='pyjamas.Canvas2D';

		modules['pyjamas.ui.Event'] = pyjamas.ui.Event();
		pyjslib.import_module(sys.loadpath, 'pyjamas.Canvas2D', 'pyjamas.ui.Event', 0, false);
		track.module='pyjamas.Canvas2D';

		pyjamas.Canvas2D.Event = pyjamas.ui.Event;
		track.lineno=16;
		modules['pyjamas'] = pyjamas();
		pyjslib.import_module(sys.loadpath, 'pyjamas.Canvas2D', 'pyjamas', 0, false);
		track.module='pyjamas.Canvas2D';

		modules['pyjamas.ui'] = pyjamas.ui();
		pyjslib.import_module(sys.loadpath, 'pyjamas.Canvas2D', 'pyjamas.ui', 0, false);
		track.module='pyjamas.Canvas2D';

		modules['pyjamas'] = pyjamas();
		pyjslib.import_module(sys.loadpath, 'pyjamas.Canvas2D', 'pyjamas', 0, false);
		track.module='pyjamas.Canvas2D';

		modules['pyjamas.ui'] = pyjamas.ui();
		pyjslib.import_module(sys.loadpath, 'pyjamas.Canvas2D', 'pyjamas.ui', 0, false);
		track.module='pyjamas.Canvas2D';

		modules['pyjamas.ui.MouseListener'] = pyjamas.ui.MouseListener();
		pyjslib.import_module(sys.loadpath, 'pyjamas.Canvas2D', 'pyjamas.ui.MouseListener', 0, false);
		track.module='pyjamas.Canvas2D';

		pyjamas.Canvas2D.MouseListener = pyjamas.ui.MouseListener;
		track.lineno=17;
		modules['pyjamas'] = pyjamas();
		pyjslib.import_module(sys.loadpath, 'pyjamas.Canvas2D', 'pyjamas', 0, false);
		track.module='pyjamas.Canvas2D';

		modules['pyjamas.ui'] = pyjamas.ui();
		pyjslib.import_module(sys.loadpath, 'pyjamas.Canvas2D', 'pyjamas.ui', 0, false);
		track.module='pyjamas.Canvas2D';

		modules['pyjamas'] = pyjamas();
		pyjslib.import_module(sys.loadpath, 'pyjamas.Canvas2D', 'pyjamas', 0, false);
		track.module='pyjamas.Canvas2D';

		modules['pyjamas.ui'] = pyjamas.ui();
		pyjslib.import_module(sys.loadpath, 'pyjamas.Canvas2D', 'pyjamas.ui', 0, false);
		track.module='pyjamas.Canvas2D';

		modules['pyjamas.ui.KeyboardListener'] = pyjamas.ui.KeyboardListener();
		pyjslib.import_module(sys.loadpath, 'pyjamas.Canvas2D', 'pyjamas.ui.KeyboardListener', 0, false);
		track.module='pyjamas.Canvas2D';

		pyjamas.Canvas2D.KeyboardListener = pyjamas.ui.KeyboardListener;
		track.lineno=18;
		modules['pyjamas'] = pyjamas();
		pyjslib.import_module(sys.loadpath, 'pyjamas.Canvas2D', 'pyjamas', 0, false);
		track.module='pyjamas.Canvas2D';

		modules['pyjamas.ui'] = pyjamas.ui();
		pyjslib.import_module(sys.loadpath, 'pyjamas.Canvas2D', 'pyjamas.ui', 0, false);
		track.module='pyjamas.Canvas2D';

		modules['pyjamas'] = pyjamas();
		pyjslib.import_module(sys.loadpath, 'pyjamas.Canvas2D', 'pyjamas', 0, false);
		track.module='pyjamas.Canvas2D';

		modules['pyjamas.ui'] = pyjamas.ui();
		pyjslib.import_module(sys.loadpath, 'pyjamas.Canvas2D', 'pyjamas.ui', 0, false);
		track.module='pyjamas.Canvas2D';

		modules['pyjamas.ui.Focus'] = pyjamas.ui.Focus();
		pyjslib.import_module(sys.loadpath, 'pyjamas.Canvas2D', 'pyjamas.ui.Focus', 0, false);
		track.module='pyjamas.Canvas2D';

		pyjamas.Canvas2D.Focus = pyjamas.ui.Focus;
		track.lineno=19;
		modules['pyjamas'] = pyjamas();
		pyjslib.import_module(sys.loadpath, 'pyjamas.Canvas2D', 'pyjamas', 0, false);
		track.module='pyjamas.Canvas2D';

		modules['pyjamas.ui'] = pyjamas.ui();
		pyjslib.import_module(sys.loadpath, 'pyjamas.Canvas2D', 'pyjamas.ui', 0, false);
		track.module='pyjamas.Canvas2D';

		modules['pyjamas'] = pyjamas();
		pyjslib.import_module(sys.loadpath, 'pyjamas.Canvas2D', 'pyjamas', 0, false);
		track.module='pyjamas.Canvas2D';

		modules['pyjamas.ui'] = pyjamas.ui();
		pyjslib.import_module(sys.loadpath, 'pyjamas.Canvas2D', 'pyjamas.ui', 0, false);
		track.module='pyjamas.Canvas2D';

		modules['pyjamas.ui.FocusListener'] = pyjamas.ui.FocusListener();
		pyjslib.import_module(sys.loadpath, 'pyjamas.Canvas2D', 'pyjamas.ui.FocusListener', 0, false);
		track.module='pyjamas.Canvas2D';

		pyjamas.Canvas2D.FocusListener = pyjamas.ui.FocusListener;
		track.lineno=21;
		pyjamas.Canvas2D.Canvas = (function(){
			var cls_instance = pyjs__class_instance('Canvas');
			var cls_definition = new Object();
			cls_definition.__md5__ = '1fc6bbd82af3d16a4923cbc217bb3929';
			cls_definition.__init__ = pyjs__bind_method(cls_instance, '__init__', function(width, height) {
				if (this.__is_instance__ === true) {
					var self = this;
					if (pyjs_options.arg_count && arguments.length != 2) pyjs__exception_func_param(arguments.callee.__name__, 3, 3, arguments.length+1);
				} else {
					var self = arguments[0];
					width = arguments[1];
					height = arguments[2];
					if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					if (pyjs_options.arg_count && arguments.length != 3) pyjs__exception_func_param(arguments.callee.__name__, 3, 3, arguments.length);
				}
				if (pyjs_options.arg_instance_type) {
					if (self.prototype.__md5__ !== '1fc6bbd82af3d16a4923cbc217bb3929') {
						if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
							pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
						}
					}
				}
				track={module:pyjamas.Canvas2D, lineno:22};trackstack.push(track);
				track.module='pyjamas.Canvas2D';
				track.lineno=22;
				track.lineno=23;
				pyjamas.Canvas2D.Widget.__init__(self);
				track.lineno=24;
				self.context = null;
				track.lineno=26;
				self.setElement(pyjamas.Canvas2D.DOM.createDiv());
				track.lineno=27;
				var canvas = pyjamas.Canvas2D.DOM.createElement(String('canvas'));
				track.lineno=28;
				self.setWidth(width);
				track.lineno=29;
				self.setHeight(height);
				track.lineno=31;
				canvas.width = width;
				track.lineno=32;
				canvas.height = height;
				track.lineno=34;
				pyjamas.Canvas2D.DOM.appendChild(self.getElement(), canvas);
				track.lineno=35;
				self.setStyleName(String('gwt-Canvas'));
				track.lineno=37;
				self.init();
				track.lineno=39;
				self.context.fillStyle = String('black');
				track.lineno=40;
				self.context.strokeStyle = String('black');
				track.lineno=42;
				self.focusable = null;
				track.lineno=43;
				self.focusable = pyjamas.Canvas2D.Focus.createFocusable();
				track.lineno=45;
				self.focusListeners = new pyjslib.List([]);
				track.lineno=46;
				self.clickListeners = new pyjslib.List([]);
				track.lineno=47;
				self.mouseListeners = new pyjslib.List([]);
				track.lineno=48;
				self.keyboardListeners = new pyjslib.List([]);
				track.lineno=50;
				pyjamas.Canvas2D.DOM.appendChild(self.getElement(), (self.focusable===undefined?(function(){throw new TypeError('self.focusable is undefined')})():(typeof self.focusable == 'function' && self.__is_instance__?pyjslib.getattr(self, 'focusable'):self.focusable)));
				track.lineno=51;
				pyjamas.Canvas2D.DOM.sinkEvents(canvas, ((pyjamas.Canvas2D.Event.ONCLICK===undefined?(function(){throw new TypeError('pyjamas.Canvas2D.Event.ONCLICK is undefined')})():(typeof pyjamas.Canvas2D.Event.ONCLICK == 'function' && pyjamas.Canvas2D.Event.__is_instance__?pyjslib.getattr(pyjamas.Canvas2D.Event, 'ONCLICK'):pyjamas.Canvas2D.Event.ONCLICK)) | (pyjamas.Canvas2D.Event.MOUSEEVENTS===undefined?(function(){throw new TypeError('pyjamas.Canvas2D.Event.MOUSEEVENTS is undefined')})():(typeof pyjamas.Canvas2D.Event.MOUSEEVENTS == 'function' && pyjamas.Canvas2D.Event.__is_instance__?pyjslib.getattr(pyjamas.Canvas2D.Event, 'MOUSEEVENTS'):pyjamas.Canvas2D.Event.MOUSEEVENTS)) | pyjamas.Canvas2D.DOM.getEventsSunk(canvas)));
				track.lineno=52;
				pyjamas.Canvas2D.DOM.sinkEvents((self.focusable===undefined?(function(){throw new TypeError('self.focusable is undefined')})():(typeof self.focusable == 'function' && self.__is_instance__?pyjslib.getattr(self, 'focusable'):self.focusable)), ((pyjamas.Canvas2D.Event.FOCUSEVENTS===undefined?(function(){throw new TypeError('pyjamas.Canvas2D.Event.FOCUSEVENTS is undefined')})():(typeof pyjamas.Canvas2D.Event.FOCUSEVENTS == 'function' && pyjamas.Canvas2D.Event.__is_instance__?pyjslib.getattr(pyjamas.Canvas2D.Event, 'FOCUSEVENTS'):pyjamas.Canvas2D.Event.FOCUSEVENTS)) | (pyjamas.Canvas2D.Event.KEYEVENTS===undefined?(function(){throw new TypeError('pyjamas.Canvas2D.Event.KEYEVENTS is undefined')})():(typeof pyjamas.Canvas2D.Event.KEYEVENTS == 'function' && pyjamas.Canvas2D.Event.__is_instance__?pyjslib.getattr(pyjamas.Canvas2D.Event, 'KEYEVENTS'):pyjamas.Canvas2D.Event.KEYEVENTS))));
				trackstack.pop();track=trackstack.pop();trackstack.push(track);
				return null;
			}
			, function ( __kwargs, width, height ) {
				if (typeof width == 'undefined') {
					width=__kwargs.width;
					delete __kwargs.width;
				} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.width != 'undefined') {
					pyjs__exception_func_multiple_values('__init__', 'width');
				}
				if (typeof height == 'undefined') {
					height=__kwargs.height;
					delete __kwargs.height;
				} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.height != 'undefined') {
					pyjs__exception_func_multiple_values('__init__', 'height');
				}
				if (pyjs_options.arg_kwarg_unexpected_keyword) {
					for (var i in __kwargs) {
						pyjs__exception_func_unexpected_keyword('__init__', i);
					}
				}
				var __r = [width, height];
				for (var pyjs__va_arg = 3;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
					__r.push(arguments[pyjs__va_arg]);
				}

				return __r;
			});
			cls_definition.addClickListener = pyjs__bind_method(cls_instance, 'addClickListener', function(listener) {
				if (this.__is_instance__ === true) {
					var self = this;
					if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 2, 2, arguments.length+1);
				} else {
					var self = arguments[0];
					listener = arguments[1];
					if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					if (pyjs_options.arg_count && arguments.length != 2) pyjs__exception_func_param(arguments.callee.__name__, 2, 2, arguments.length);
				}
				if (pyjs_options.arg_instance_type) {
					if (self.prototype.__md5__ !== '1fc6bbd82af3d16a4923cbc217bb3929') {
						if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
							pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
						}
					}
				}
				track={module:pyjamas.Canvas2D, lineno:54};trackstack.push(track);
				track.module='pyjamas.Canvas2D';
				track.lineno=54;
				track.lineno=55;
				self.clickListeners.append(listener);
				trackstack.pop();track=trackstack.pop();trackstack.push(track);
				return null;
			}
			, function ( __kwargs, listener ) {
				if (typeof listener == 'undefined') {
					listener=__kwargs.listener;
					delete __kwargs.listener;
				} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.listener != 'undefined') {
					pyjs__exception_func_multiple_values('addClickListener', 'listener');
				}
				if (pyjs_options.arg_kwarg_unexpected_keyword) {
					for (var i in __kwargs) {
						pyjs__exception_func_unexpected_keyword('addClickListener', i);
					}
				}
				var __r = [listener];
				for (var pyjs__va_arg = 2;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
					__r.push(arguments[pyjs__va_arg]);
				}

				return __r;
			});
			cls_definition.addMouseListener = pyjs__bind_method(cls_instance, 'addMouseListener', function(listener) {
				if (this.__is_instance__ === true) {
					var self = this;
					if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 2, 2, arguments.length+1);
				} else {
					var self = arguments[0];
					listener = arguments[1];
					if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					if (pyjs_options.arg_count && arguments.length != 2) pyjs__exception_func_param(arguments.callee.__name__, 2, 2, arguments.length);
				}
				if (pyjs_options.arg_instance_type) {
					if (self.prototype.__md5__ !== '1fc6bbd82af3d16a4923cbc217bb3929') {
						if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
							pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
						}
					}
				}
				track={module:pyjamas.Canvas2D, lineno:57};trackstack.push(track);
				track.module='pyjamas.Canvas2D';
				track.lineno=57;
				track.lineno=58;
				self.mouseListeners.append(listener);
				trackstack.pop();track=trackstack.pop();trackstack.push(track);
				return null;
			}
			, function ( __kwargs, listener ) {
				if (typeof listener == 'undefined') {
					listener=__kwargs.listener;
					delete __kwargs.listener;
				} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.listener != 'undefined') {
					pyjs__exception_func_multiple_values('addMouseListener', 'listener');
				}
				if (pyjs_options.arg_kwarg_unexpected_keyword) {
					for (var i in __kwargs) {
						pyjs__exception_func_unexpected_keyword('addMouseListener', i);
					}
				}
				var __r = [listener];
				for (var pyjs__va_arg = 2;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
					__r.push(arguments[pyjs__va_arg]);
				}

				return __r;
			});
			cls_definition.addFocusListener = pyjs__bind_method(cls_instance, 'addFocusListener', function(listener) {
				if (this.__is_instance__ === true) {
					var self = this;
					if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 2, 2, arguments.length+1);
				} else {
					var self = arguments[0];
					listener = arguments[1];
					if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					if (pyjs_options.arg_count && arguments.length != 2) pyjs__exception_func_param(arguments.callee.__name__, 2, 2, arguments.length);
				}
				if (pyjs_options.arg_instance_type) {
					if (self.prototype.__md5__ !== '1fc6bbd82af3d16a4923cbc217bb3929') {
						if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
							pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
						}
					}
				}
				track={module:pyjamas.Canvas2D, lineno:60};trackstack.push(track);
				track.module='pyjamas.Canvas2D';
				track.lineno=60;
				track.lineno=61;
				self.focusListeners.append(listener);
				trackstack.pop();track=trackstack.pop();trackstack.push(track);
				return null;
			}
			, function ( __kwargs, listener ) {
				if (typeof listener == 'undefined') {
					listener=__kwargs.listener;
					delete __kwargs.listener;
				} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.listener != 'undefined') {
					pyjs__exception_func_multiple_values('addFocusListener', 'listener');
				}
				if (pyjs_options.arg_kwarg_unexpected_keyword) {
					for (var i in __kwargs) {
						pyjs__exception_func_unexpected_keyword('addFocusListener', i);
					}
				}
				var __r = [listener];
				for (var pyjs__va_arg = 2;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
					__r.push(arguments[pyjs__va_arg]);
				}

				return __r;
			});
			cls_definition.addKeyboardListener = pyjs__bind_method(cls_instance, 'addKeyboardListener', function(listener) {
				if (this.__is_instance__ === true) {
					var self = this;
					if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 2, 2, arguments.length+1);
				} else {
					var self = arguments[0];
					listener = arguments[1];
					if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					if (pyjs_options.arg_count && arguments.length != 2) pyjs__exception_func_param(arguments.callee.__name__, 2, 2, arguments.length);
				}
				if (pyjs_options.arg_instance_type) {
					if (self.prototype.__md5__ !== '1fc6bbd82af3d16a4923cbc217bb3929') {
						if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
							pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
						}
					}
				}
				track={module:pyjamas.Canvas2D, lineno:63};trackstack.push(track);
				track.module='pyjamas.Canvas2D';
				track.lineno=63;
				track.lineno=64;
				self.keyboardListeners.append(listener);
				trackstack.pop();track=trackstack.pop();trackstack.push(track);
				return null;
			}
			, function ( __kwargs, listener ) {
				if (typeof listener == 'undefined') {
					listener=__kwargs.listener;
					delete __kwargs.listener;
				} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.listener != 'undefined') {
					pyjs__exception_func_multiple_values('addKeyboardListener', 'listener');
				}
				if (pyjs_options.arg_kwarg_unexpected_keyword) {
					for (var i in __kwargs) {
						pyjs__exception_func_unexpected_keyword('addKeyboardListener', i);
					}
				}
				var __r = [listener];
				for (var pyjs__va_arg = 2;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
					__r.push(arguments[pyjs__va_arg]);
				}

				return __r;
			});
			cls_definition.onBrowserEvent = pyjs__bind_method(cls_instance, 'onBrowserEvent', function(event) {
				if (this.__is_instance__ === true) {
					var self = this;
					if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 2, 2, arguments.length+1);
				} else {
					var self = arguments[0];
					event = arguments[1];
					if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					if (pyjs_options.arg_count && arguments.length != 2) pyjs__exception_func_param(arguments.callee.__name__, 2, 2, arguments.length);
				}
				if (pyjs_options.arg_instance_type) {
					if (self.prototype.__md5__ !== '1fc6bbd82af3d16a4923cbc217bb3929') {
						if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
							pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
						}
					}
				}
				track={module:pyjamas.Canvas2D, lineno:66};trackstack.push(track);
				track.module='pyjamas.Canvas2D';
				track.lineno=66;
				track.lineno=67;
				var type = pyjamas.Canvas2D.DOM.eventGetType(event);
				track.lineno=69;
				if (pyjslib.bool(pyjslib.eq(type, String('click')))) {
					track.lineno=70;
					var pyjs__trackstack_size_1=trackstack.length;
					var __listener = self.clickListeners.__iter__();
					try {
						while (true) {
							var listener = __listener.next();
							
							track.lineno=71;
							if (pyjslib.bool(pyjslib.hasattr(listener, String('onClick')))) {
								track.lineno=71;
								listener.onClick(self);
							}
							else {
								track.lineno=72;
								listener(self, event);
							}
						}
					} catch (e) {
						if (e.__name__ != 'StopIteration') {
							throw e;
						}
					}
					if (trackstack.length > pyjs__trackstack_size_1) {
						trackstack = trackstack.slice(0,pyjs__trackstack_size_1);
						track = trackstack.slice(-1)[0];
					}
					track.module='pyjamas.Canvas2D';
				}
				else if (pyjslib.bool((pyjslib.eq(type, String('blur'))) || (pyjslib.eq(type, String('focus'))))) {
					track.lineno=74;
					pyjamas.Canvas2D.FocusListener.fireFocusEvent((self.focusListeners===undefined?(function(){throw new TypeError('self.focusListeners is undefined')})():(typeof self.focusListeners == 'function' && self.__is_instance__?pyjslib.getattr(self, 'focusListeners'):self.focusListeners)), self, event);
				}
				else if (pyjslib.bool((pyjslib.eq(type, String('keydown'))) || (pyjslib.eq(type, String('keypress'))) || (pyjslib.eq(type, String('keyup'))))) {
					track.lineno=76;
					pyjamas.Canvas2D.KeyboardListener.fireKeyboardEvent((self.keyboardListeners===undefined?(function(){throw new TypeError('self.keyboardListeners is undefined')})():(typeof self.keyboardListeners == 'function' && self.__is_instance__?pyjslib.getattr(self, 'keyboardListeners'):self.keyboardListeners)), self, event);
				}
				trackstack.pop();track=trackstack.pop();trackstack.push(track);
				return null;
			}
			, function ( __kwargs, event ) {
				if (typeof event == 'undefined') {
					event=__kwargs.event;
					delete __kwargs.event;
				} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.event != 'undefined') {
					pyjs__exception_func_multiple_values('onBrowserEvent', 'event');
				}
				if (pyjs_options.arg_kwarg_unexpected_keyword) {
					for (var i in __kwargs) {
						pyjs__exception_func_unexpected_keyword('onBrowserEvent', i);
					}
				}
				var __r = [event];
				for (var pyjs__va_arg = 2;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
					__r.push(arguments[pyjs__va_arg]);
				}

				return __r;
			});
			cls_definition.removeClickListener = pyjs__bind_method(cls_instance, 'removeClickListener', function(listener) {
				if (this.__is_instance__ === true) {
					var self = this;
					if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 2, 2, arguments.length+1);
				} else {
					var self = arguments[0];
					listener = arguments[1];
					if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					if (pyjs_options.arg_count && arguments.length != 2) pyjs__exception_func_param(arguments.callee.__name__, 2, 2, arguments.length);
				}
				if (pyjs_options.arg_instance_type) {
					if (self.prototype.__md5__ !== '1fc6bbd82af3d16a4923cbc217bb3929') {
						if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
							pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
						}
					}
				}
				track={module:pyjamas.Canvas2D, lineno:78};trackstack.push(track);
				track.module='pyjamas.Canvas2D';
				track.lineno=78;
				track.lineno=79;
				self.clickListeners.remove(listener);
				trackstack.pop();track=trackstack.pop();trackstack.push(track);
				return null;
			}
			, function ( __kwargs, listener ) {
				if (typeof listener == 'undefined') {
					listener=__kwargs.listener;
					delete __kwargs.listener;
				} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.listener != 'undefined') {
					pyjs__exception_func_multiple_values('removeClickListener', 'listener');
				}
				if (pyjs_options.arg_kwarg_unexpected_keyword) {
					for (var i in __kwargs) {
						pyjs__exception_func_unexpected_keyword('removeClickListener', i);
					}
				}
				var __r = [listener];
				for (var pyjs__va_arg = 2;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
					__r.push(arguments[pyjs__va_arg]);
				}

				return __r;
			});
			cls_definition.removeMouseListener = pyjs__bind_method(cls_instance, 'removeMouseListener', function(listener) {
				if (this.__is_instance__ === true) {
					var self = this;
					if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 2, 2, arguments.length+1);
				} else {
					var self = arguments[0];
					listener = arguments[1];
					if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					if (pyjs_options.arg_count && arguments.length != 2) pyjs__exception_func_param(arguments.callee.__name__, 2, 2, arguments.length);
				}
				if (pyjs_options.arg_instance_type) {
					if (self.prototype.__md5__ !== '1fc6bbd82af3d16a4923cbc217bb3929') {
						if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
							pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
						}
					}
				}
				track={module:pyjamas.Canvas2D, lineno:81};trackstack.push(track);
				track.module='pyjamas.Canvas2D';
				track.lineno=81;
				track.lineno=82;
				self.mouseListeners.remove(listener);
				trackstack.pop();track=trackstack.pop();trackstack.push(track);
				return null;
			}
			, function ( __kwargs, listener ) {
				if (typeof listener == 'undefined') {
					listener=__kwargs.listener;
					delete __kwargs.listener;
				} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.listener != 'undefined') {
					pyjs__exception_func_multiple_values('removeMouseListener', 'listener');
				}
				if (pyjs_options.arg_kwarg_unexpected_keyword) {
					for (var i in __kwargs) {
						pyjs__exception_func_unexpected_keyword('removeMouseListener', i);
					}
				}
				var __r = [listener];
				for (var pyjs__va_arg = 2;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
					__r.push(arguments[pyjs__va_arg]);
				}

				return __r;
			});
			cls_definition.removeFocusListener = pyjs__bind_method(cls_instance, 'removeFocusListener', function(listener) {
				if (this.__is_instance__ === true) {
					var self = this;
					if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 2, 2, arguments.length+1);
				} else {
					var self = arguments[0];
					listener = arguments[1];
					if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					if (pyjs_options.arg_count && arguments.length != 2) pyjs__exception_func_param(arguments.callee.__name__, 2, 2, arguments.length);
				}
				if (pyjs_options.arg_instance_type) {
					if (self.prototype.__md5__ !== '1fc6bbd82af3d16a4923cbc217bb3929') {
						if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
							pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
						}
					}
				}
				track={module:pyjamas.Canvas2D, lineno:84};trackstack.push(track);
				track.module='pyjamas.Canvas2D';
				track.lineno=84;
				track.lineno=85;
				self.focusListeners.remove(listener);
				trackstack.pop();track=trackstack.pop();trackstack.push(track);
				return null;
			}
			, function ( __kwargs, listener ) {
				if (typeof listener == 'undefined') {
					listener=__kwargs.listener;
					delete __kwargs.listener;
				} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.listener != 'undefined') {
					pyjs__exception_func_multiple_values('removeFocusListener', 'listener');
				}
				if (pyjs_options.arg_kwarg_unexpected_keyword) {
					for (var i in __kwargs) {
						pyjs__exception_func_unexpected_keyword('removeFocusListener', i);
					}
				}
				var __r = [listener];
				for (var pyjs__va_arg = 2;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
					__r.push(arguments[pyjs__va_arg]);
				}

				return __r;
			});
			cls_definition.removeKeyboardListener = pyjs__bind_method(cls_instance, 'removeKeyboardListener', function(listener) {
				if (this.__is_instance__ === true) {
					var self = this;
					if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 2, 2, arguments.length+1);
				} else {
					var self = arguments[0];
					listener = arguments[1];
					if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					if (pyjs_options.arg_count && arguments.length != 2) pyjs__exception_func_param(arguments.callee.__name__, 2, 2, arguments.length);
				}
				if (pyjs_options.arg_instance_type) {
					if (self.prototype.__md5__ !== '1fc6bbd82af3d16a4923cbc217bb3929') {
						if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
							pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
						}
					}
				}
				track={module:pyjamas.Canvas2D, lineno:87};trackstack.push(track);
				track.module='pyjamas.Canvas2D';
				track.lineno=87;
				track.lineno=88;
				self.keyboardListeners.remove(listener);
				trackstack.pop();track=trackstack.pop();trackstack.push(track);
				return null;
			}
			, function ( __kwargs, listener ) {
				if (typeof listener == 'undefined') {
					listener=__kwargs.listener;
					delete __kwargs.listener;
				} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.listener != 'undefined') {
					pyjs__exception_func_multiple_values('removeKeyboardListener', 'listener');
				}
				if (pyjs_options.arg_kwarg_unexpected_keyword) {
					for (var i in __kwargs) {
						pyjs__exception_func_unexpected_keyword('removeKeyboardListener', i);
					}
				}
				var __r = [listener];
				for (var pyjs__va_arg = 2;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
					__r.push(arguments[pyjs__va_arg]);
				}

				return __r;
			});
			cls_definition.setFocus = pyjs__bind_method(cls_instance, 'setFocus', function(focused) {
				if (this.__is_instance__ === true) {
					var self = this;
					if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 2, 2, arguments.length+1);
				} else {
					var self = arguments[0];
					focused = arguments[1];
					if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					if (pyjs_options.arg_count && arguments.length != 2) pyjs__exception_func_param(arguments.callee.__name__, 2, 2, arguments.length);
				}
				if (pyjs_options.arg_instance_type) {
					if (self.prototype.__md5__ !== '1fc6bbd82af3d16a4923cbc217bb3929') {
						if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
							pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
						}
					}
				}
				track={module:pyjamas.Canvas2D, lineno:90};trackstack.push(track);
				track.module='pyjamas.Canvas2D';
				track.lineno=90;
				track.lineno=91;
				if (pyjslib.bool(focused)) {
					track.lineno=92;
					pyjamas.Canvas2D.Focus.focus((self.focusable===undefined?(function(){throw new TypeError('self.focusable is undefined')})():(typeof self.focusable == 'function' && self.__is_instance__?pyjslib.getattr(self, 'focusable'):self.focusable)));
				}
				else {
					track.lineno=94;
					pyjamas.Canvas2D.Focus.blur((self.focusable===undefined?(function(){throw new TypeError('self.focusable is undefined')})():(typeof self.focusable == 'function' && self.__is_instance__?pyjslib.getattr(self, 'focusable'):self.focusable)));
				}
				trackstack.pop();track=trackstack.pop();trackstack.push(track);
				return null;
			}
			, function ( __kwargs, focused ) {
				if (typeof focused == 'undefined') {
					focused=__kwargs.focused;
					delete __kwargs.focused;
				} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.focused != 'undefined') {
					pyjs__exception_func_multiple_values('setFocus', 'focused');
				}
				if (pyjs_options.arg_kwarg_unexpected_keyword) {
					for (var i in __kwargs) {
						pyjs__exception_func_unexpected_keyword('setFocus', i);
					}
				}
				var __r = [focused];
				for (var pyjs__va_arg = 2;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
					__r.push(arguments[pyjs__va_arg]);
				}

				return __r;
			});
			cls_definition.getContext = pyjs__bind_method(cls_instance, 'getContext', function() {
				if (this.__is_instance__ === true) {
					var self = this;
					if (pyjs_options.arg_count && arguments.length != 0) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length+1);
				} else {
					var self = arguments[0];
					if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length);
				}
				if (pyjs_options.arg_instance_type) {
					if (self.prototype.__md5__ !== '1fc6bbd82af3d16a4923cbc217bb3929') {
						if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
							pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
						}
					}
				}
				track={module:pyjamas.Canvas2D, lineno:96};trackstack.push(track);
				track.module='pyjamas.Canvas2D';
				track.lineno=96;
				track.lineno=97;
				track.lineno=97;
				var pyjs__ret = (self.context===undefined?(function(){throw new TypeError('self.context is undefined')})():(typeof self.context == 'function' && self.__is_instance__?pyjslib.getattr(self, 'context'):self.context));
				trackstack.pop();track=trackstack.pop();trackstack.push(track);
				return pyjs__ret;
			}
			, function ( __kwargs ) {
				if (pyjs_options.arg_kwarg_unexpected_keyword) {
					for (var i in __kwargs) {
						pyjs__exception_func_unexpected_keyword('getContext', i);
					}
				}
				var __r = [];
				for (var pyjs__va_arg = 1;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
					__r.push(arguments[pyjs__va_arg]);
				}

				return __r;
			});
			cls_definition.isEmulation = pyjs__bind_method(cls_instance, 'isEmulation', function() {
				if (this.__is_instance__ === true) {
					var self = this;
					if (pyjs_options.arg_count && arguments.length != 0) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length+1);
				} else {
					var self = arguments[0];
					if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length);
				}
				if (pyjs_options.arg_instance_type) {
					if (self.prototype.__md5__ !== '1fc6bbd82af3d16a4923cbc217bb3929') {
						if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
							pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
						}
					}
				}

        return (typeof $wnd.G_vmlCanvasManager != "undefined");
        
			}
			, function ( __kwargs ) {
				if (pyjs_options.arg_kwarg_unexpected_keyword) {
					for (var i in __kwargs) {
						pyjs__exception_func_unexpected_keyword('isEmulation', i);
					}
				}
				var __r = [];
				for (var pyjs__va_arg = 1;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
					__r.push(arguments[pyjs__va_arg]);
				}

				return __r;
			});
			cls_definition.init = pyjs__bind_method(cls_instance, 'init', function() {
				if (this.__is_instance__ === true) {
					var self = this;
					if (pyjs_options.arg_count && arguments.length != 0) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length+1);
				} else {
					var self = arguments[0];
					if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length);
				}
				if (pyjs_options.arg_instance_type) {
					if (self.prototype.__md5__ !== '1fc6bbd82af3d16a4923cbc217bb3929') {
						if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
							pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
						}
					}
				}

        var el = this.getElement().firstChild;
        if (typeof $wnd.G_vmlCanvasManager != "undefined") {
            var parent = el.parent;
            
            el = $wnd.G_vmlCanvasManager.fixElement_(el);
            el.getContext = function () {
                if (this.context_) {
                    return this.context_;
                }
                return this.context_ = new $wnd.CanvasRenderingContext2D(el);
            };
        
            el.attachEvent("onpropertychange", function (e) {
                // we need to watch changes to width and height
                switch (e.propertyName) {
                    case "width":
                    case "height":
                    // coord size changed?
                    break;
                }
            });

            // if style.height is set
            
            var attrs = el.attributes;
            if (attrs.width && attrs.width.specified) {
                // TODO: use runtimeStyle and coordsize
                // el.getContext().setWidth_(attrs.width.nodeValue);
                el.style.width = attrs.width.nodeValue + "px";
            }
            if (attrs.height && attrs.height.specified) {
                // TODO: use runtimeStyle and coordsize
                // el.getContext().setHeight_(attrs.height.nodeValue);
                el.style.height = attrs.height.nodeValue + "px";
            }
        }
        var ctx = el.getContext("2d");
        
        ctx._createPattern = ctx.createPattern;
        ctx.createPattern = function(img, rep) {
            if (!(img instanceof Image)) img = img.getElement(); 
            return this._createPattern(img, rep);
            }

        ctx._drawImage = ctx.drawImage;
        ctx.drawImage = function() {
            var a=arguments;
            if (!(a[0] instanceof Image)) a[0] = a[0].getElement();
            if (a.length==9) return this._drawImage(a[0], a[1], a[2], a[3], a[4], a[5], a[6], a[7], a[8]);
            else if (a.length==5) return this._drawImage(a[0], a[1], a[2], a[3], a[4]);
            return this._drawImage(a[0], a[1], a[2]);
            }
        
        this.context = ctx;
        
			}
			, function ( __kwargs ) {
				if (pyjs_options.arg_kwarg_unexpected_keyword) {
					for (var i in __kwargs) {
						pyjs__exception_func_unexpected_keyword('init', i);
					}
				}
				var __r = [];
				for (var pyjs__va_arg = 1;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
					__r.push(arguments[pyjs__va_arg]);
				}

				return __r;
			});
			return pyjs__class_function(cls_instance, cls_definition, 
			                            new Array(pyjamas.Canvas2D.Widget));
		})();
		track.lineno=162;
		pyjamas.Canvas2D.CanvasImage = (function(){
			var cls_instance = pyjs__class_instance('CanvasImage');
			var cls_definition = new Object();
			cls_definition.__md5__ = 'f6d65256ec9cb1aa5867a8f06b528d01';
			cls_definition.__init__ = pyjs__bind_method(cls_instance, '__init__', function(url, load_listener) {
				if (this.__is_instance__ === true) {
					var self = this;
					if (pyjs_options.arg_count && (arguments.length < 0 || arguments.length > 2)) pyjs__exception_func_param(arguments.callee.__name__, 1, 3, arguments.length+1);
				} else {
					var self = arguments[0];
					url = arguments[1];
					load_listener = arguments[2];
					if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					if (pyjs_options.arg_count && (arguments.length < 1 || arguments.length > 3)) pyjs__exception_func_param(arguments.callee.__name__, 1, 3, arguments.length);
				}
				if (pyjs_options.arg_instance_type) {
					if (self.prototype.__md5__ !== 'f6d65256ec9cb1aa5867a8f06b528d01') {
						if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
							pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
						}
					}
				}
				if (typeof url == 'undefined') url=String('');
				if (typeof load_listener == 'undefined') load_listener=null;
				track={module:pyjamas.Canvas2D, lineno:163};trackstack.push(track);
				track.module='pyjamas.Canvas2D';
				track.lineno=163;
				track.lineno=164;
				pyjamas.Canvas2D.Image.__init__(self, url);
				track.lineno=165;
				if (pyjslib.bool(load_listener)) {
					track.lineno=166;
					self.addLoadListener(load_listener);
				}
				track.lineno=167;
				self.onAttach();
				trackstack.pop();track=trackstack.pop();trackstack.push(track);
				return null;
			}
			, function ( __kwargs, url, load_listener ) {
				if (typeof url == 'undefined') {
					url=__kwargs.url;
					delete __kwargs.url;
				} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.url != 'undefined') {
					pyjs__exception_func_multiple_values('__init__', 'url');
				}
				if (typeof load_listener == 'undefined') {
					load_listener=__kwargs.load_listener;
					delete __kwargs.load_listener;
				} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.load_listener != 'undefined') {
					pyjs__exception_func_multiple_values('__init__', 'load_listener');
				}
				if (pyjs_options.arg_kwarg_unexpected_keyword) {
					for (var i in __kwargs) {
						pyjs__exception_func_unexpected_keyword('__init__', i);
					}
				}
				var __r = [url, load_listener];
				for (var pyjs__va_arg = 3;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
					__r.push(arguments[pyjs__va_arg]);
				}

				return __r;
			});
			cls_definition.isLoaded = pyjs__bind_method(cls_instance, 'isLoaded', function() {
				if (this.__is_instance__ === true) {
					var self = this;
					if (pyjs_options.arg_count && arguments.length != 0) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length+1);
				} else {
					var self = arguments[0];
					if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length);
				}
				if (pyjs_options.arg_instance_type) {
					if (self.prototype.__md5__ !== 'f6d65256ec9cb1aa5867a8f06b528d01') {
						if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
							pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
						}
					}
				}
				track={module:pyjamas.Canvas2D, lineno:169};trackstack.push(track);
				track.module='pyjamas.Canvas2D';
				track.lineno=169;
				track.lineno=170;
				track.lineno=170;
				var pyjs__ret = (function(){var pyjs__testval=self.getElement().complete;return (pyjs__testval===undefined?(function(){throw new TypeError('self.getElement().complete is undefined')})():pyjs__testval)})();
				trackstack.pop();track=trackstack.pop();trackstack.push(track);
				return pyjs__ret;
			}
			, function ( __kwargs ) {
				if (pyjs_options.arg_kwarg_unexpected_keyword) {
					for (var i in __kwargs) {
						pyjs__exception_func_unexpected_keyword('isLoaded', i);
					}
				}
				var __r = [];
				for (var pyjs__va_arg = 1;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
					__r.push(arguments[pyjs__va_arg]);
				}

				return __r;
			});
			return pyjs__class_function(cls_instance, cls_definition, 
			                            new Array(pyjamas.Canvas2D.Image));
		})();
		track.lineno=173;
		pyjamas.Canvas2D.ImageLoadListener = (function(){
			var cls_instance = pyjs__class_instance('ImageLoadListener');
			var cls_definition = new Object();
			cls_definition.__md5__ = '1c315560e1ffe0c13c7c3ea742a2f66f';
			cls_definition.__init__ = pyjs__bind_method(cls_instance, '__init__', function(listener) {
				if (this.__is_instance__ === true) {
					var self = this;
					if (pyjs_options.arg_count && (arguments.length < 0 || arguments.length > 1)) pyjs__exception_func_param(arguments.callee.__name__, 1, 2, arguments.length+1);
				} else {
					var self = arguments[0];
					listener = arguments[1];
					if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					if (pyjs_options.arg_count && (arguments.length < 1 || arguments.length > 2)) pyjs__exception_func_param(arguments.callee.__name__, 1, 2, arguments.length);
				}
				if (pyjs_options.arg_instance_type) {
					if (self.prototype.__md5__ !== '1c315560e1ffe0c13c7c3ea742a2f66f') {
						if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
							pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
						}
					}
				}
				if (typeof listener == 'undefined') listener=null;
				track={module:pyjamas.Canvas2D, lineno:174};trackstack.push(track);
				track.module='pyjamas.Canvas2D';
				track.lineno=174;
				track.lineno=175;
				self.wait_list = new pyjslib.List([]);
				track.lineno=176;
				self.loadListeners = new pyjslib.List([]);
				track.lineno=178;
				if (pyjslib.bool(listener)) {
					track.lineno=179;
					self.addLoadListener(listener);
				}
				trackstack.pop();track=trackstack.pop();trackstack.push(track);
				return null;
			}
			, function ( __kwargs, listener ) {
				if (typeof listener == 'undefined') {
					listener=__kwargs.listener;
					delete __kwargs.listener;
				} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.listener != 'undefined') {
					pyjs__exception_func_multiple_values('__init__', 'listener');
				}
				if (pyjs_options.arg_kwarg_unexpected_keyword) {
					for (var i in __kwargs) {
						pyjs__exception_func_unexpected_keyword('__init__', i);
					}
				}
				var __r = [listener];
				for (var pyjs__va_arg = 2;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
					__r.push(arguments[pyjs__va_arg]);
				}

				return __r;
			});
			cls_definition.add = pyjs__bind_method(cls_instance, 'add', function(sender) {
				if (this.__is_instance__ === true) {
					var self = this;
					if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 2, 2, arguments.length+1);
				} else {
					var self = arguments[0];
					sender = arguments[1];
					if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					if (pyjs_options.arg_count && arguments.length != 2) pyjs__exception_func_param(arguments.callee.__name__, 2, 2, arguments.length);
				}
				if (pyjs_options.arg_instance_type) {
					if (self.prototype.__md5__ !== '1c315560e1ffe0c13c7c3ea742a2f66f') {
						if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
							pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
						}
					}
				}
				track={module:pyjamas.Canvas2D, lineno:181};trackstack.push(track);
				track.module='pyjamas.Canvas2D';
				track.lineno=181;
				track.lineno=182;
				self.wait_list.append(sender);
				track.lineno=183;
				sender.addLoadListener(self);
				trackstack.pop();track=trackstack.pop();trackstack.push(track);
				return null;
			}
			, function ( __kwargs, sender ) {
				if (typeof sender == 'undefined') {
					sender=__kwargs.sender;
					delete __kwargs.sender;
				} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.sender != 'undefined') {
					pyjs__exception_func_multiple_values('add', 'sender');
				}
				if (pyjs_options.arg_kwarg_unexpected_keyword) {
					for (var i in __kwargs) {
						pyjs__exception_func_unexpected_keyword('add', i);
					}
				}
				var __r = [sender];
				for (var pyjs__va_arg = 2;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
					__r.push(arguments[pyjs__va_arg]);
				}

				return __r;
			});
			cls_definition.addLoadListener = pyjs__bind_method(cls_instance, 'addLoadListener', function(listener) {
				if (this.__is_instance__ === true) {
					var self = this;
					if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 2, 2, arguments.length+1);
				} else {
					var self = arguments[0];
					listener = arguments[1];
					if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					if (pyjs_options.arg_count && arguments.length != 2) pyjs__exception_func_param(arguments.callee.__name__, 2, 2, arguments.length);
				}
				if (pyjs_options.arg_instance_type) {
					if (self.prototype.__md5__ !== '1c315560e1ffe0c13c7c3ea742a2f66f') {
						if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
							pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
						}
					}
				}
				track={module:pyjamas.Canvas2D, lineno:185};trackstack.push(track);
				track.module='pyjamas.Canvas2D';
				track.lineno=185;
				track.lineno=186;
				self.loadListeners.append(listener);
				trackstack.pop();track=trackstack.pop();trackstack.push(track);
				return null;
			}
			, function ( __kwargs, listener ) {
				if (typeof listener == 'undefined') {
					listener=__kwargs.listener;
					delete __kwargs.listener;
				} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.listener != 'undefined') {
					pyjs__exception_func_multiple_values('addLoadListener', 'listener');
				}
				if (pyjs_options.arg_kwarg_unexpected_keyword) {
					for (var i in __kwargs) {
						pyjs__exception_func_unexpected_keyword('addLoadListener', i);
					}
				}
				var __r = [listener];
				for (var pyjs__va_arg = 2;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
					__r.push(arguments[pyjs__va_arg]);
				}

				return __r;
			});
			cls_definition.isLoaded = pyjs__bind_method(cls_instance, 'isLoaded', function() {
				if (this.__is_instance__ === true) {
					var self = this;
					if (pyjs_options.arg_count && arguments.length != 0) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length+1);
				} else {
					var self = arguments[0];
					if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length);
				}
				if (pyjs_options.arg_instance_type) {
					if (self.prototype.__md5__ !== '1c315560e1ffe0c13c7c3ea742a2f66f') {
						if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
							pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
						}
					}
				}
				track={module:pyjamas.Canvas2D, lineno:188};trackstack.push(track);
				track.module='pyjamas.Canvas2D';
				track.lineno=188;
				track.lineno=189;
				if (pyjslib.bool(pyjslib.len((self.wait_list===undefined?(function(){throw new TypeError('self.wait_list is undefined')})():(typeof self.wait_list == 'function' && self.__is_instance__?pyjslib.getattr(self, 'wait_list'):self.wait_list))))) {
					track.lineno=190;
					track.lineno=190;
					var pyjs__ret = false;
					trackstack.pop();track=trackstack.pop();trackstack.push(track);
					return pyjs__ret;
				}
				track.lineno=191;
				track.lineno=191;
				var pyjs__ret = true;
				trackstack.pop();track=trackstack.pop();trackstack.push(track);
				return pyjs__ret;
			}
			, function ( __kwargs ) {
				if (pyjs_options.arg_kwarg_unexpected_keyword) {
					for (var i in __kwargs) {
						pyjs__exception_func_unexpected_keyword('isLoaded', i);
					}
				}
				var __r = [];
				for (var pyjs__va_arg = 1;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
					__r.push(arguments[pyjs__va_arg]);
				}

				return __r;
			});
			cls_definition.onError = pyjs__bind_method(cls_instance, 'onError', function(sender) {
				if (this.__is_instance__ === true) {
					var self = this;
					if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 2, 2, arguments.length+1);
				} else {
					var self = arguments[0];
					sender = arguments[1];
					if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					if (pyjs_options.arg_count && arguments.length != 2) pyjs__exception_func_param(arguments.callee.__name__, 2, 2, arguments.length);
				}
				if (pyjs_options.arg_instance_type) {
					if (self.prototype.__md5__ !== '1c315560e1ffe0c13c7c3ea742a2f66f') {
						if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
							pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
						}
					}
				}
				track={module:pyjamas.Canvas2D, lineno:193};trackstack.push(track);
				track.module='pyjamas.Canvas2D';
				track.lineno=193;
				track.lineno=194;
				var pyjs__trackstack_size_1=trackstack.length;
				var __listener = self.loadListeners.__iter__();
				try {
					while (true) {
						var listener = __listener.next();
						
						track.lineno=195;
						listener.onError(sender);
					}
				} catch (e) {
					if (e.__name__ != 'StopIteration') {
						throw e;
					}
				}
				if (trackstack.length > pyjs__trackstack_size_1) {
					trackstack = trackstack.slice(0,pyjs__trackstack_size_1);
					track = trackstack.slice(-1)[0];
				}
				track.module='pyjamas.Canvas2D';
				trackstack.pop();track=trackstack.pop();trackstack.push(track);
				return null;
			}
			, function ( __kwargs, sender ) {
				if (typeof sender == 'undefined') {
					sender=__kwargs.sender;
					delete __kwargs.sender;
				} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.sender != 'undefined') {
					pyjs__exception_func_multiple_values('onError', 'sender');
				}
				if (pyjs_options.arg_kwarg_unexpected_keyword) {
					for (var i in __kwargs) {
						pyjs__exception_func_unexpected_keyword('onError', i);
					}
				}
				var __r = [sender];
				for (var pyjs__va_arg = 2;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
					__r.push(arguments[pyjs__va_arg]);
				}

				return __r;
			});
			cls_definition.onLoad = pyjs__bind_method(cls_instance, 'onLoad', function(sender) {
				if (this.__is_instance__ === true) {
					var self = this;
					if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 2, 2, arguments.length+1);
				} else {
					var self = arguments[0];
					sender = arguments[1];
					if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					if (pyjs_options.arg_count && arguments.length != 2) pyjs__exception_func_param(arguments.callee.__name__, 2, 2, arguments.length);
				}
				if (pyjs_options.arg_instance_type) {
					if (self.prototype.__md5__ !== '1c315560e1ffe0c13c7c3ea742a2f66f') {
						if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
							pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
						}
					}
				}
				track={module:pyjamas.Canvas2D, lineno:197};trackstack.push(track);
				track.module='pyjamas.Canvas2D';
				track.lineno=197;
				track.lineno=198;
				self.wait_list.remove(sender);
				track.lineno=200;
				if (pyjslib.bool(self.isLoaded())) {
					track.lineno=201;
					var pyjs__trackstack_size_1=trackstack.length;
					var __listener = self.loadListeners.__iter__();
					try {
						while (true) {
							var listener = __listener.next();
							
							track.lineno=202;
							listener.onLoad(self);
						}
					} catch (e) {
						if (e.__name__ != 'StopIteration') {
							throw e;
						}
					}
					if (trackstack.length > pyjs__trackstack_size_1) {
						trackstack = trackstack.slice(0,pyjs__trackstack_size_1);
						track = trackstack.slice(-1)[0];
					}
					track.module='pyjamas.Canvas2D';
				}
				trackstack.pop();track=trackstack.pop();trackstack.push(track);
				return null;
			}
			, function ( __kwargs, sender ) {
				if (typeof sender == 'undefined') {
					sender=__kwargs.sender;
					delete __kwargs.sender;
				} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.sender != 'undefined') {
					pyjs__exception_func_multiple_values('onLoad', 'sender');
				}
				if (pyjs_options.arg_kwarg_unexpected_keyword) {
					for (var i in __kwargs) {
						pyjs__exception_func_unexpected_keyword('onLoad', i);
					}
				}
				var __r = [sender];
				for (var pyjs__va_arg = 2;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
					__r.push(arguments[pyjs__va_arg]);
				}

				return __r;
			});
			return pyjs__class_function(cls_instance, cls_definition, 
			                            new Array(pyjslib.object));
		})();

	} catch (pyjs_attr_err) {throw pyjslib._errorMapping(pyjs_attr_err)};
return this;
}; /* end pyjamas.Canvas2D */ 




pyjamas.Canvas2D_loaded_fn = function() {
}

pyjamas.Canvas2D_prepare_mod = function() {
    if ((typeof (module_load_request['pyjamas.Canvas2D']) == 'undefined') ||
        (module_load_request['pyjamas.Canvas2D'] < 2)) {
        module_load_request['pyjamas.Canvas2D'] = 2;
    }
    var modnames = new pyjslib.List([
		new pyjslib.List([
			'pyjamas']),
		new pyjslib.List([
			'pyjamas.DOM',
			'pyjamas.ui']),
		new pyjslib.List([
			'pyjamas.ui.Event',
			'pyjamas.ui.MouseListener',
			'pyjamas.ui.KeyboardListener',
			'pyjamas.ui.Focus',
			'pyjamas.ui.FocusListener']),
		new pyjslib.List([
			'pyjamas.ui.Image',
			'pyjamas.ui.Widget'])
	]);
    sys.overrides.update(new pyjslib.Dict({
		'mozilla.pyjslib': 'mozilla.pyjslib',
		'mozilla.pyjamas.DOM': 'mozilla.pyjamas.DOM'
	}));
    path = sys.loadpath;
    /*
    pyjslib.preload_app_modules(path, modnames, pyjamas.Canvas2D_loaded_fn,
                                            0,
                                            null);
                                            //'pyjamas.Canvas2D');
                                            */
    //alert("module ajax loaded fn called pyjamas.Canvas2D");

    if (sys.appname != 'pyjamas.Canvas2D')
    {
        if (module_load_request['pyjamas.Canvas2D'] < 3) {
            module_load_request['pyjamas.Canvas2D'] = 3;
        }
    }
}

//alert("module ajax loaded pyjamas.Canvas2D");

pyjamas.Canvas2D_prepare_mod();


// pyjamas.ui.ComplexPanel

// module libs (usually imported javascript)



// module code

pyjamas.ui.ComplexPanel = function (__mod_name__) {
	if(pyjamas.ui.ComplexPanel.__was_initialized__) return;
	pyjamas.ui.ComplexPanel.__was_initialized__ = true;
	if (__mod_name__ == null) __mod_name__ = 'pyjamas.ui.ComplexPanel';
	var __name__ = pyjamas.ui.ComplexPanel.__name__ = __mod_name__;
	pyjamas.ui.ComplexPanel.__track_lines__ = new Array();
	var ComplexPanel = pyjamas.ui.ComplexPanel;

		pyjamas.ui.ComplexPanel.__track_lines__[1] = "pyjamas.ui.ComplexPanel.py, line 1:\n    # Copyright 2006 James Tauber and contributors";
		pyjamas.ui.ComplexPanel.__track_lines__[14] = "pyjamas.ui.ComplexPanel.py, line 14:\n    from pyjamas import DOM";
		pyjamas.ui.ComplexPanel.__track_lines__[16] = "pyjamas.ui.ComplexPanel.py, line 16:\n    from pyjamas.ui.Panel import Panel";
		pyjamas.ui.ComplexPanel.__track_lines__[18] = "pyjamas.ui.ComplexPanel.py, line 18:\n    class ComplexPanel(Panel):";
		pyjamas.ui.ComplexPanel.__track_lines__[22] = "pyjamas.ui.ComplexPanel.py, line 22:\n    def __init__(self):";
		pyjamas.ui.ComplexPanel.__track_lines__[23] = "pyjamas.ui.ComplexPanel.py, line 23:\n    Panel.__init__(self)";
		pyjamas.ui.ComplexPanel.__track_lines__[24] = "pyjamas.ui.ComplexPanel.py, line 24:\n    self.children = []";
		pyjamas.ui.ComplexPanel.__track_lines__[26] = "pyjamas.ui.ComplexPanel.py, line 26:\n    def add(self, widget, container):";
		pyjamas.ui.ComplexPanel.__track_lines__[27] = "pyjamas.ui.ComplexPanel.py, line 27:\n    self.insert(widget, container, len(self.children))";
		pyjamas.ui.ComplexPanel.__track_lines__[29] = "pyjamas.ui.ComplexPanel.py, line 29:\n    def getChildren(self):";
		pyjamas.ui.ComplexPanel.__track_lines__[30] = "pyjamas.ui.ComplexPanel.py, line 30:\n    return self.children";
		pyjamas.ui.ComplexPanel.__track_lines__[32] = "pyjamas.ui.ComplexPanel.py, line 32:\n    def insert(self, widget, container, beforeIndex):";
		pyjamas.ui.ComplexPanel.__track_lines__[33] = "pyjamas.ui.ComplexPanel.py, line 33:\n    if widget.getParent() == self:";
		pyjamas.ui.ComplexPanel.__track_lines__[34] = "pyjamas.ui.ComplexPanel.py, line 34:\n    return";
		pyjamas.ui.ComplexPanel.__track_lines__[36] = "pyjamas.ui.ComplexPanel.py, line 36:\n    self.adopt(widget, container)";
		pyjamas.ui.ComplexPanel.__track_lines__[37] = "pyjamas.ui.ComplexPanel.py, line 37:\n    self.children.insert(beforeIndex, widget)";
		pyjamas.ui.ComplexPanel.__track_lines__[45] = "pyjamas.ui.ComplexPanel.py, line 45:\n    def remove(self, widget):";
		pyjamas.ui.ComplexPanel.__track_lines__[46] = "pyjamas.ui.ComplexPanel.py, line 46:\n    if widget not in self.children:";
		pyjamas.ui.ComplexPanel.__track_lines__[47] = "pyjamas.ui.ComplexPanel.py, line 47:\n    return False";
		pyjamas.ui.ComplexPanel.__track_lines__[49] = "pyjamas.ui.ComplexPanel.py, line 49:\n    self.disown(widget)";
		pyjamas.ui.ComplexPanel.__track_lines__[52] = "pyjamas.ui.ComplexPanel.py, line 52:\n    self.children.remove(widget)";
		pyjamas.ui.ComplexPanel.__track_lines__[53] = "pyjamas.ui.ComplexPanel.py, line 53:\n    return True";
	try {
		track.module='pyjamas.ui.ComplexPanel';
		track.lineno=1;
		track.lineno=14;
		modules['pyjamas'] = pyjamas();
		pyjslib.import_module(sys.loadpath, 'pyjamas.ui.ComplexPanel', 'pyjamas', 0, false);
		track.module='pyjamas.ui.ComplexPanel';

		modules['pyjamas'] = pyjamas();
		pyjslib.import_module(sys.loadpath, 'pyjamas.ui.ComplexPanel', 'pyjamas', 0, false);
		track.module='pyjamas.ui.ComplexPanel';

		modules['pyjamas.DOM'] = pyjamas.DOM();
		pyjslib.import_module(sys.loadpath, 'pyjamas.ui.ComplexPanel', 'pyjamas.DOM', 0, false);
		track.module='pyjamas.ui.ComplexPanel';

		pyjamas.ui.ComplexPanel.DOM = pyjamas.DOM;
		track.lineno=16;
		modules['pyjamas'] = pyjamas();
		pyjslib.import_module(sys.loadpath, 'pyjamas.ui.ComplexPanel', 'pyjamas', 0, false);
		track.module='pyjamas.ui.ComplexPanel';

		modules['pyjamas.ui'] = pyjamas.ui();
		pyjslib.import_module(sys.loadpath, 'pyjamas.ui.ComplexPanel', 'pyjamas.ui', 0, false);
		track.module='pyjamas.ui.ComplexPanel';

		modules['pyjamas.ui.Panel'] = pyjamas.ui.Panel();
		pyjslib.import_module(sys.loadpath, 'pyjamas.ui.ComplexPanel', 'pyjamas.ui.Panel', 0, false);
		track.module='pyjamas.ui.ComplexPanel';

		pyjamas.ui.ComplexPanel.Panel = pyjamas.ui.Panel.Panel;
		track.lineno=18;
		pyjamas.ui.ComplexPanel.ComplexPanel = (function(){
			var cls_instance = pyjs__class_instance('ComplexPanel');
			var cls_definition = new Object();
			cls_definition.__md5__ = '87614ca2f6369222a56a975bbea96ce6';
			cls_definition.__init__ = pyjs__bind_method(cls_instance, '__init__', function() {
				if (this.__is_instance__ === true) {
					var self = this;
					if (pyjs_options.arg_count && arguments.length != 0) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length+1);
				} else {
					var self = arguments[0];
					if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length);
				}
				if (pyjs_options.arg_instance_type) {
					if (self.prototype.__md5__ !== '87614ca2f6369222a56a975bbea96ce6') {
						if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
							pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
						}
					}
				}
				track={module:pyjamas.ui.ComplexPanel, lineno:22};trackstack.push(track);
				track.module='pyjamas.ui.ComplexPanel';
				track.lineno=22;
				track.lineno=23;
				pyjamas.ui.ComplexPanel.Panel.__init__(self);
				track.lineno=24;
				self.children = new pyjslib.List([]);
				trackstack.pop();track=trackstack.pop();trackstack.push(track);
				return null;
			}
			, function ( __kwargs ) {
				if (pyjs_options.arg_kwarg_unexpected_keyword) {
					for (var i in __kwargs) {
						pyjs__exception_func_unexpected_keyword('__init__', i);
					}
				}
				var __r = [];
				for (var pyjs__va_arg = 1;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
					__r.push(arguments[pyjs__va_arg]);
				}

				return __r;
			});
			cls_definition.add = pyjs__bind_method(cls_instance, 'add', function(widget, container) {
				if (this.__is_instance__ === true) {
					var self = this;
					if (pyjs_options.arg_count && arguments.length != 2) pyjs__exception_func_param(arguments.callee.__name__, 3, 3, arguments.length+1);
				} else {
					var self = arguments[0];
					widget = arguments[1];
					container = arguments[2];
					if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					if (pyjs_options.arg_count && arguments.length != 3) pyjs__exception_func_param(arguments.callee.__name__, 3, 3, arguments.length);
				}
				if (pyjs_options.arg_instance_type) {
					if (self.prototype.__md5__ !== '87614ca2f6369222a56a975bbea96ce6') {
						if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
							pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
						}
					}
				}
				track={module:pyjamas.ui.ComplexPanel, lineno:26};trackstack.push(track);
				track.module='pyjamas.ui.ComplexPanel';
				track.lineno=26;
				track.lineno=27;
				self.insert(widget, container, pyjslib.len((self.children===undefined?(function(){throw new TypeError('self.children is undefined')})():(typeof self.children == 'function' && self.__is_instance__?pyjslib.getattr(self, 'children'):self.children))));
				trackstack.pop();track=trackstack.pop();trackstack.push(track);
				return null;
			}
			, function ( __kwargs, widget, container ) {
				if (typeof widget == 'undefined') {
					widget=__kwargs.widget;
					delete __kwargs.widget;
				} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.widget != 'undefined') {
					pyjs__exception_func_multiple_values('add', 'widget');
				}
				if (typeof container == 'undefined') {
					container=__kwargs.container;
					delete __kwargs.container;
				} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.container != 'undefined') {
					pyjs__exception_func_multiple_values('add', 'container');
				}
				if (pyjs_options.arg_kwarg_unexpected_keyword) {
					for (var i in __kwargs) {
						pyjs__exception_func_unexpected_keyword('add', i);
					}
				}
				var __r = [widget, container];
				for (var pyjs__va_arg = 3;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
					__r.push(arguments[pyjs__va_arg]);
				}

				return __r;
			});
			cls_definition.getChildren = pyjs__bind_method(cls_instance, 'getChildren', function() {
				if (this.__is_instance__ === true) {
					var self = this;
					if (pyjs_options.arg_count && arguments.length != 0) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length+1);
				} else {
					var self = arguments[0];
					if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length);
				}
				if (pyjs_options.arg_instance_type) {
					if (self.prototype.__md5__ !== '87614ca2f6369222a56a975bbea96ce6') {
						if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
							pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
						}
					}
				}
				track={module:pyjamas.ui.ComplexPanel, lineno:29};trackstack.push(track);
				track.module='pyjamas.ui.ComplexPanel';
				track.lineno=29;
				track.lineno=30;
				track.lineno=30;
				var pyjs__ret = (self.children===undefined?(function(){throw new TypeError('self.children is undefined')})():(typeof self.children == 'function' && self.__is_instance__?pyjslib.getattr(self, 'children'):self.children));
				trackstack.pop();track=trackstack.pop();trackstack.push(track);
				return pyjs__ret;
			}
			, function ( __kwargs ) {
				if (pyjs_options.arg_kwarg_unexpected_keyword) {
					for (var i in __kwargs) {
						pyjs__exception_func_unexpected_keyword('getChildren', i);
					}
				}
				var __r = [];
				for (var pyjs__va_arg = 1;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
					__r.push(arguments[pyjs__va_arg]);
				}

				return __r;
			});
			cls_definition.insert = pyjs__bind_method(cls_instance, 'insert', function(widget, container, beforeIndex) {
				if (this.__is_instance__ === true) {
					var self = this;
					if (pyjs_options.arg_count && arguments.length != 3) pyjs__exception_func_param(arguments.callee.__name__, 4, 4, arguments.length+1);
				} else {
					var self = arguments[0];
					widget = arguments[1];
					container = arguments[2];
					beforeIndex = arguments[3];
					if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					if (pyjs_options.arg_count && arguments.length != 4) pyjs__exception_func_param(arguments.callee.__name__, 4, 4, arguments.length);
				}
				if (pyjs_options.arg_instance_type) {
					if (self.prototype.__md5__ !== '87614ca2f6369222a56a975bbea96ce6') {
						if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
							pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
						}
					}
				}
				track={module:pyjamas.ui.ComplexPanel, lineno:32};trackstack.push(track);
				track.module='pyjamas.ui.ComplexPanel';
				track.lineno=32;
				track.lineno=33;
				if (pyjslib.bool(pyjslib.eq(widget.getParent(), self))) {
					track.lineno=34;
					track.lineno=34;
					var pyjs__ret = null;
					trackstack.pop();track=trackstack.pop();trackstack.push(track);
					return pyjs__ret;
				}
				track.lineno=36;
				self.adopt(widget, container);
				track.lineno=37;
				self.children.insert(beforeIndex, widget);
				trackstack.pop();track=trackstack.pop();trackstack.push(track);
				return null;
			}
			, function ( __kwargs, widget, container, beforeIndex ) {
				if (typeof widget == 'undefined') {
					widget=__kwargs.widget;
					delete __kwargs.widget;
				} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.widget != 'undefined') {
					pyjs__exception_func_multiple_values('insert', 'widget');
				}
				if (typeof container == 'undefined') {
					container=__kwargs.container;
					delete __kwargs.container;
				} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.container != 'undefined') {
					pyjs__exception_func_multiple_values('insert', 'container');
				}
				if (typeof beforeIndex == 'undefined') {
					beforeIndex=__kwargs.beforeIndex;
					delete __kwargs.beforeIndex;
				} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.beforeIndex != 'undefined') {
					pyjs__exception_func_multiple_values('insert', 'beforeIndex');
				}
				if (pyjs_options.arg_kwarg_unexpected_keyword) {
					for (var i in __kwargs) {
						pyjs__exception_func_unexpected_keyword('insert', i);
					}
				}
				var __r = [widget, container, beforeIndex];
				for (var pyjs__va_arg = 4;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
					__r.push(arguments[pyjs__va_arg]);
				}

				return __r;
			});
			cls_definition.remove = pyjs__bind_method(cls_instance, 'remove', function(widget) {
				if (this.__is_instance__ === true) {
					var self = this;
					if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 2, 2, arguments.length+1);
				} else {
					var self = arguments[0];
					widget = arguments[1];
					if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					if (pyjs_options.arg_count && arguments.length != 2) pyjs__exception_func_param(arguments.callee.__name__, 2, 2, arguments.length);
				}
				if (pyjs_options.arg_instance_type) {
					if (self.prototype.__md5__ !== '87614ca2f6369222a56a975bbea96ce6') {
						if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
							pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
						}
					}
				}
				track={module:pyjamas.ui.ComplexPanel, lineno:45};trackstack.push(track);
				track.module='pyjamas.ui.ComplexPanel';
				track.lineno=45;
				track.lineno=46;
				if (pyjslib.bool(!(self.children===undefined?(function(){throw new TypeError('self.children is undefined')})():(typeof self.children == 'function' && self.__is_instance__?pyjslib.getattr(self, 'children'):self.children)).__contains__(widget))) {
					track.lineno=47;
					track.lineno=47;
					var pyjs__ret = false;
					trackstack.pop();track=trackstack.pop();trackstack.push(track);
					return pyjs__ret;
				}
				track.lineno=49;
				self.disown(widget);
				track.lineno=52;
				self.children.remove(widget);
				track.lineno=53;
				track.lineno=53;
				var pyjs__ret = true;
				trackstack.pop();track=trackstack.pop();trackstack.push(track);
				return pyjs__ret;
			}
			, function ( __kwargs, widget ) {
				if (typeof widget == 'undefined') {
					widget=__kwargs.widget;
					delete __kwargs.widget;
				} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.widget != 'undefined') {
					pyjs__exception_func_multiple_values('remove', 'widget');
				}
				if (pyjs_options.arg_kwarg_unexpected_keyword) {
					for (var i in __kwargs) {
						pyjs__exception_func_unexpected_keyword('remove', i);
					}
				}
				var __r = [widget];
				for (var pyjs__va_arg = 2;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
					__r.push(arguments[pyjs__va_arg]);
				}

				return __r;
			});
			return pyjs__class_function(cls_instance, cls_definition, 
			                            new Array(pyjamas.ui.ComplexPanel.Panel));
		})();

	} catch (pyjs_attr_err) {throw pyjslib._errorMapping(pyjs_attr_err)};
return this;
}; /* end pyjamas.ui.ComplexPanel */ 




pyjamas.ui.ComplexPanel_loaded_fn = function() {
}

pyjamas.ui.ComplexPanel_prepare_mod = function() {
    if ((typeof (module_load_request['pyjamas.ui.ComplexPanel']) == 'undefined') ||
        (module_load_request['pyjamas.ui.ComplexPanel'] < 2)) {
        module_load_request['pyjamas.ui.ComplexPanel'] = 2;
    }
    var modnames = new pyjslib.List([
		new pyjslib.List([
			'pyjamas']),
		new pyjslib.List([
			'pyjamas.DOM',
			'pyjamas.ui']),
		new pyjslib.List([
			]),
		new pyjslib.List([
			'pyjamas.ui.Panel'])
	]);
    sys.overrides.update(new pyjslib.Dict({
		'mozilla.pyjslib': 'mozilla.pyjslib',
		'mozilla.pyjamas.DOM': 'mozilla.pyjamas.DOM'
	}));
    path = sys.loadpath;
    /*
    pyjslib.preload_app_modules(path, modnames, pyjamas.ui.ComplexPanel_loaded_fn,
                                            0,
                                            null);
                                            //'pyjamas.ui.ComplexPanel');
                                            */
    //alert("module ajax loaded fn called pyjamas.ui.ComplexPanel");

    if (sys.appname != 'pyjamas.ui.ComplexPanel')
    {
        if (module_load_request['pyjamas.ui.ComplexPanel'] < 3) {
            module_load_request['pyjamas.ui.ComplexPanel'] = 3;
        }
    }
}

//alert("module ajax loaded pyjamas.ui.ComplexPanel");

pyjamas.ui.ComplexPanel_prepare_mod();


// pyjamas.ui.AbsolutePanel

// module libs (usually imported javascript)



// module code

pyjamas.ui.AbsolutePanel = function (__mod_name__) {
	if(pyjamas.ui.AbsolutePanel.__was_initialized__) return;
	pyjamas.ui.AbsolutePanel.__was_initialized__ = true;
	if (__mod_name__ == null) __mod_name__ = 'pyjamas.ui.AbsolutePanel';
	var __name__ = pyjamas.ui.AbsolutePanel.__name__ = __mod_name__;
	pyjamas.ui.AbsolutePanel.__track_lines__ = new Array();
	var AbsolutePanel = pyjamas.ui.AbsolutePanel;

		pyjamas.ui.AbsolutePanel.__track_lines__[1] = "pyjamas.ui.AbsolutePanel.py, line 1:\n    # Copyright 2006 James Tauber and contributors";
		pyjamas.ui.AbsolutePanel.__track_lines__[14] = "pyjamas.ui.AbsolutePanel.py, line 14:\n    from __pyjamas__ import JS, console";
		pyjamas.ui.AbsolutePanel.__track_lines__[15] = "pyjamas.ui.AbsolutePanel.py, line 15:\n    from pyjamas import DOM";
		pyjamas.ui.AbsolutePanel.__track_lines__[16] = "pyjamas.ui.AbsolutePanel.py, line 16:\n    import pyjslib";
		pyjamas.ui.AbsolutePanel.__track_lines__[18] = "pyjamas.ui.AbsolutePanel.py, line 18:\n    from pyjamas.ui.ComplexPanel import ComplexPanel";
		pyjamas.ui.AbsolutePanel.__track_lines__[20] = "pyjamas.ui.AbsolutePanel.py, line 20:\n    class AbsolutePanel(ComplexPanel):";
		pyjamas.ui.AbsolutePanel.__track_lines__[22] = "pyjamas.ui.AbsolutePanel.py, line 22:\n    def __init__(self):";
		pyjamas.ui.AbsolutePanel.__track_lines__[23] = "pyjamas.ui.AbsolutePanel.py, line 23:\n    ComplexPanel.__init__(self)";
		pyjamas.ui.AbsolutePanel.__track_lines__[24] = "pyjamas.ui.AbsolutePanel.py, line 24:\n    self.setElement(DOM.createDiv())";
		pyjamas.ui.AbsolutePanel.__track_lines__[25] = "pyjamas.ui.AbsolutePanel.py, line 25:\n    DOM.setStyleAttribute(self.getElement(), \"position\", \"relative\")";
		pyjamas.ui.AbsolutePanel.__track_lines__[26] = "pyjamas.ui.AbsolutePanel.py, line 26:\n    DOM.setStyleAttribute(self.getElement(), \"overflow\", \"hidden\")";
		pyjamas.ui.AbsolutePanel.__track_lines__[28] = "pyjamas.ui.AbsolutePanel.py, line 28:\n    def add(self, widget, left=None, top=None):";
		pyjamas.ui.AbsolutePanel.__track_lines__[29] = "pyjamas.ui.AbsolutePanel.py, line 29:\n    ComplexPanel.add(self, widget, self.getElement())";
		pyjamas.ui.AbsolutePanel.__track_lines__[31] = "pyjamas.ui.AbsolutePanel.py, line 31:\n    if left != None:";
		pyjamas.ui.AbsolutePanel.__track_lines__[32] = "pyjamas.ui.AbsolutePanel.py, line 32:\n    self.setWidgetPosition(widget, left, top)";
		pyjamas.ui.AbsolutePanel.__track_lines__[34] = "pyjamas.ui.AbsolutePanel.py, line 34:\n    def setWidgetPosition(self, widget, left, top):";
		pyjamas.ui.AbsolutePanel.__track_lines__[35] = "pyjamas.ui.AbsolutePanel.py, line 35:\n    self.checkWidgetParent(widget)";
		pyjamas.ui.AbsolutePanel.__track_lines__[37] = "pyjamas.ui.AbsolutePanel.py, line 37:\n    h = widget.getElement()";
		pyjamas.ui.AbsolutePanel.__track_lines__[38] = "pyjamas.ui.AbsolutePanel.py, line 38:\n    if (left == -1) and (top == -1):";
		pyjamas.ui.AbsolutePanel.__track_lines__[39] = "pyjamas.ui.AbsolutePanel.py, line 39:\n    DOM.setStyleAttribute(h, \"left\", \"\")";
		pyjamas.ui.AbsolutePanel.__track_lines__[40] = "pyjamas.ui.AbsolutePanel.py, line 40:\n    DOM.setStyleAttribute(h, \"top\", \"\")";
		pyjamas.ui.AbsolutePanel.__track_lines__[41] = "pyjamas.ui.AbsolutePanel.py, line 41:\n    DOM.setStyleAttribute(h, \"position\", \"static\")";
		pyjamas.ui.AbsolutePanel.__track_lines__[43] = "pyjamas.ui.AbsolutePanel.py, line 43:\n    DOM.setStyleAttribute(h, \"position\", \"absolute\")";
		pyjamas.ui.AbsolutePanel.__track_lines__[44] = "pyjamas.ui.AbsolutePanel.py, line 44:\n    DOM.setStyleAttribute(h, \"left\", left + \"px\")";
		pyjamas.ui.AbsolutePanel.__track_lines__[45] = "pyjamas.ui.AbsolutePanel.py, line 45:\n    DOM.setStyleAttribute(h, \"top\", top + \"px\")";
		pyjamas.ui.AbsolutePanel.__track_lines__[47] = "pyjamas.ui.AbsolutePanel.py, line 47:\n    def getWidgetLeft(self, widget):";
		pyjamas.ui.AbsolutePanel.__track_lines__[48] = "pyjamas.ui.AbsolutePanel.py, line 48:\n    self.checkWidgetParent(widget)";
		pyjamas.ui.AbsolutePanel.__track_lines__[49] = "pyjamas.ui.AbsolutePanel.py, line 49:\n    return DOM.getIntAttribute(widget.getElement(), \"offsetLeft\")";
		pyjamas.ui.AbsolutePanel.__track_lines__[51] = "pyjamas.ui.AbsolutePanel.py, line 51:\n    def getWidgetTop(self, widget):";
		pyjamas.ui.AbsolutePanel.__track_lines__[52] = "pyjamas.ui.AbsolutePanel.py, line 52:\n    self.checkWidgetParent(widget)";
		pyjamas.ui.AbsolutePanel.__track_lines__[53] = "pyjamas.ui.AbsolutePanel.py, line 53:\n    return DOM.getIntAttribute(widget.getElement(), \"offsetTop\")";
		pyjamas.ui.AbsolutePanel.__track_lines__[55] = "pyjamas.ui.AbsolutePanel.py, line 55:\n    def checkWidgetParent(self, widget):";
		pyjamas.ui.AbsolutePanel.__track_lines__[56] = "pyjamas.ui.AbsolutePanel.py, line 56:\n    if widget.getParent() != self:";
		pyjamas.ui.AbsolutePanel.__track_lines__[57] = "pyjamas.ui.AbsolutePanel.py, line 57:\n    console.error(\"Widget must be a child of this panel.\")";
	try {
		track.module='pyjamas.ui.AbsolutePanel';
		track.lineno=1;
		track.lineno=14;
		track.lineno=15;
		modules['pyjamas'] = pyjamas();
		pyjslib.import_module(sys.loadpath, 'pyjamas.ui.AbsolutePanel', 'pyjamas', 0, false);
		track.module='pyjamas.ui.AbsolutePanel';

		modules['pyjamas'] = pyjamas();
		pyjslib.import_module(sys.loadpath, 'pyjamas.ui.AbsolutePanel', 'pyjamas', 0, false);
		track.module='pyjamas.ui.AbsolutePanel';

		modules['pyjamas.DOM'] = pyjamas.DOM();
		pyjslib.import_module(sys.loadpath, 'pyjamas.ui.AbsolutePanel', 'pyjamas.DOM', 0, false);
		track.module='pyjamas.ui.AbsolutePanel';

		pyjamas.ui.AbsolutePanel.DOM = pyjamas.DOM;
		track.lineno=16;
		modules['pyjslib'] = pyjslib();
		pyjslib.import_module(sys.loadpath, 'pyjamas.ui.AbsolutePanel', 'pyjslib', 0, false);
		track.module='pyjamas.ui.AbsolutePanel';

		pyjamas.ui.AbsolutePanel.pyjslib = pyjslib;
		track.lineno=18;
		modules['pyjamas'] = pyjamas();
		pyjslib.import_module(sys.loadpath, 'pyjamas.ui.AbsolutePanel', 'pyjamas', 0, false);
		track.module='pyjamas.ui.AbsolutePanel';

		modules['pyjamas.ui'] = pyjamas.ui();
		pyjslib.import_module(sys.loadpath, 'pyjamas.ui.AbsolutePanel', 'pyjamas.ui', 0, false);
		track.module='pyjamas.ui.AbsolutePanel';

		modules['pyjamas.ui.ComplexPanel'] = pyjamas.ui.ComplexPanel();
		pyjslib.import_module(sys.loadpath, 'pyjamas.ui.AbsolutePanel', 'pyjamas.ui.ComplexPanel', 0, false);
		track.module='pyjamas.ui.AbsolutePanel';

		pyjamas.ui.AbsolutePanel.ComplexPanel = pyjamas.ui.ComplexPanel.ComplexPanel;
		track.lineno=20;
		pyjamas.ui.AbsolutePanel.AbsolutePanel = (function(){
			var cls_instance = pyjs__class_instance('AbsolutePanel');
			var cls_definition = new Object();
			cls_definition.__md5__ = '7420a16405647bd6b66b2922e6ae73a6';
			cls_definition.__init__ = pyjs__bind_method(cls_instance, '__init__', function() {
				if (this.__is_instance__ === true) {
					var self = this;
					if (pyjs_options.arg_count && arguments.length != 0) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length+1);
				} else {
					var self = arguments[0];
					if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length);
				}
				if (pyjs_options.arg_instance_type) {
					if (self.prototype.__md5__ !== '7420a16405647bd6b66b2922e6ae73a6') {
						if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
							pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
						}
					}
				}
				track={module:pyjamas.ui.AbsolutePanel, lineno:22};trackstack.push(track);
				track.module='pyjamas.ui.AbsolutePanel';
				track.lineno=22;
				track.lineno=23;
				pyjamas.ui.AbsolutePanel.ComplexPanel.__init__(self);
				track.lineno=24;
				self.setElement(pyjamas.ui.AbsolutePanel.DOM.createDiv());
				track.lineno=25;
				pyjamas.ui.AbsolutePanel.DOM.setStyleAttribute(self.getElement(), String('position'), String('relative'));
				track.lineno=26;
				pyjamas.ui.AbsolutePanel.DOM.setStyleAttribute(self.getElement(), String('overflow'), String('hidden'));
				trackstack.pop();track=trackstack.pop();trackstack.push(track);
				return null;
			}
			, function ( __kwargs ) {
				if (pyjs_options.arg_kwarg_unexpected_keyword) {
					for (var i in __kwargs) {
						pyjs__exception_func_unexpected_keyword('__init__', i);
					}
				}
				var __r = [];
				for (var pyjs__va_arg = 1;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
					__r.push(arguments[pyjs__va_arg]);
				}

				return __r;
			});
			cls_definition.add = pyjs__bind_method(cls_instance, 'add', function(widget, left, top) {
				if (this.__is_instance__ === true) {
					var self = this;
					if (pyjs_options.arg_count && (arguments.length < 1 || arguments.length > 3)) pyjs__exception_func_param(arguments.callee.__name__, 2, 4, arguments.length+1);
				} else {
					var self = arguments[0];
					widget = arguments[1];
					left = arguments[2];
					top = arguments[3];
					if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					if (pyjs_options.arg_count && (arguments.length < 2 || arguments.length > 4)) pyjs__exception_func_param(arguments.callee.__name__, 2, 4, arguments.length);
				}
				if (pyjs_options.arg_instance_type) {
					if (self.prototype.__md5__ !== '7420a16405647bd6b66b2922e6ae73a6') {
						if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
							pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
						}
					}
				}
				if (typeof left == 'undefined') left=null;
				if (typeof top == 'undefined') top=null;
				track={module:pyjamas.ui.AbsolutePanel, lineno:28};trackstack.push(track);
				track.module='pyjamas.ui.AbsolutePanel';
				track.lineno=28;
				track.lineno=29;
				pyjamas.ui.AbsolutePanel.ComplexPanel.add(self, widget, self.getElement());
				track.lineno=31;
				if (pyjslib.bool((left != null))) {
					track.lineno=32;
					self.setWidgetPosition(widget, left, top);
				}
				trackstack.pop();track=trackstack.pop();trackstack.push(track);
				return null;
			}
			, function ( __kwargs, widget, left, top ) {
				if (typeof widget == 'undefined') {
					widget=__kwargs.widget;
					delete __kwargs.widget;
				} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.widget != 'undefined') {
					pyjs__exception_func_multiple_values('add', 'widget');
				}
				if (typeof left == 'undefined') {
					left=__kwargs.left;
					delete __kwargs.left;
				} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.left != 'undefined') {
					pyjs__exception_func_multiple_values('add', 'left');
				}
				if (typeof top == 'undefined') {
					top=__kwargs.top;
					delete __kwargs.top;
				} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.top != 'undefined') {
					pyjs__exception_func_multiple_values('add', 'top');
				}
				if (pyjs_options.arg_kwarg_unexpected_keyword) {
					for (var i in __kwargs) {
						pyjs__exception_func_unexpected_keyword('add', i);
					}
				}
				var __r = [widget, left, top];
				for (var pyjs__va_arg = 4;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
					__r.push(arguments[pyjs__va_arg]);
				}

				return __r;
			});
			cls_definition.setWidgetPosition = pyjs__bind_method(cls_instance, 'setWidgetPosition', function(widget, left, top) {
				if (this.__is_instance__ === true) {
					var self = this;
					if (pyjs_options.arg_count && arguments.length != 3) pyjs__exception_func_param(arguments.callee.__name__, 4, 4, arguments.length+1);
				} else {
					var self = arguments[0];
					widget = arguments[1];
					left = arguments[2];
					top = arguments[3];
					if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					if (pyjs_options.arg_count && arguments.length != 4) pyjs__exception_func_param(arguments.callee.__name__, 4, 4, arguments.length);
				}
				if (pyjs_options.arg_instance_type) {
					if (self.prototype.__md5__ !== '7420a16405647bd6b66b2922e6ae73a6') {
						if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
							pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
						}
					}
				}
				track={module:pyjamas.ui.AbsolutePanel, lineno:34};trackstack.push(track);
				track.module='pyjamas.ui.AbsolutePanel';
				track.lineno=34;
				track.lineno=35;
				self.checkWidgetParent(widget);
				track.lineno=37;
				var h = widget.getElement();
				track.lineno=38;
				if (pyjslib.bool((pyjslib.eq(left, -1)) && (pyjslib.eq(top, -1)))) {
					track.lineno=39;
					pyjamas.ui.AbsolutePanel.DOM.setStyleAttribute(h, String('left'), String(''));
					track.lineno=40;
					pyjamas.ui.AbsolutePanel.DOM.setStyleAttribute(h, String('top'), String(''));
					track.lineno=41;
					pyjamas.ui.AbsolutePanel.DOM.setStyleAttribute(h, String('position'), String('static'));
				}
				else {
					track.lineno=43;
					pyjamas.ui.AbsolutePanel.DOM.setStyleAttribute(h, String('position'), String('absolute'));
					track.lineno=44;
					pyjamas.ui.AbsolutePanel.DOM.setStyleAttribute(h, String('left'),  ( left + String('px') ) );
					track.lineno=45;
					pyjamas.ui.AbsolutePanel.DOM.setStyleAttribute(h, String('top'),  ( top + String('px') ) );
				}
				trackstack.pop();track=trackstack.pop();trackstack.push(track);
				return null;
			}
			, function ( __kwargs, widget, left, top ) {
				if (typeof widget == 'undefined') {
					widget=__kwargs.widget;
					delete __kwargs.widget;
				} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.widget != 'undefined') {
					pyjs__exception_func_multiple_values('setWidgetPosition', 'widget');
				}
				if (typeof left == 'undefined') {
					left=__kwargs.left;
					delete __kwargs.left;
				} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.left != 'undefined') {
					pyjs__exception_func_multiple_values('setWidgetPosition', 'left');
				}
				if (typeof top == 'undefined') {
					top=__kwargs.top;
					delete __kwargs.top;
				} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.top != 'undefined') {
					pyjs__exception_func_multiple_values('setWidgetPosition', 'top');
				}
				if (pyjs_options.arg_kwarg_unexpected_keyword) {
					for (var i in __kwargs) {
						pyjs__exception_func_unexpected_keyword('setWidgetPosition', i);
					}
				}
				var __r = [widget, left, top];
				for (var pyjs__va_arg = 4;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
					__r.push(arguments[pyjs__va_arg]);
				}

				return __r;
			});
			cls_definition.getWidgetLeft = pyjs__bind_method(cls_instance, 'getWidgetLeft', function(widget) {
				if (this.__is_instance__ === true) {
					var self = this;
					if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 2, 2, arguments.length+1);
				} else {
					var self = arguments[0];
					widget = arguments[1];
					if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					if (pyjs_options.arg_count && arguments.length != 2) pyjs__exception_func_param(arguments.callee.__name__, 2, 2, arguments.length);
				}
				if (pyjs_options.arg_instance_type) {
					if (self.prototype.__md5__ !== '7420a16405647bd6b66b2922e6ae73a6') {
						if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
							pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
						}
					}
				}
				track={module:pyjamas.ui.AbsolutePanel, lineno:47};trackstack.push(track);
				track.module='pyjamas.ui.AbsolutePanel';
				track.lineno=47;
				track.lineno=48;
				self.checkWidgetParent(widget);
				track.lineno=49;
				track.lineno=49;
				var pyjs__ret = pyjamas.ui.AbsolutePanel.DOM.getIntAttribute(widget.getElement(), String('offsetLeft'));
				trackstack.pop();track=trackstack.pop();trackstack.push(track);
				return pyjs__ret;
			}
			, function ( __kwargs, widget ) {
				if (typeof widget == 'undefined') {
					widget=__kwargs.widget;
					delete __kwargs.widget;
				} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.widget != 'undefined') {
					pyjs__exception_func_multiple_values('getWidgetLeft', 'widget');
				}
				if (pyjs_options.arg_kwarg_unexpected_keyword) {
					for (var i in __kwargs) {
						pyjs__exception_func_unexpected_keyword('getWidgetLeft', i);
					}
				}
				var __r = [widget];
				for (var pyjs__va_arg = 2;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
					__r.push(arguments[pyjs__va_arg]);
				}

				return __r;
			});
			cls_definition.getWidgetTop = pyjs__bind_method(cls_instance, 'getWidgetTop', function(widget) {
				if (this.__is_instance__ === true) {
					var self = this;
					if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 2, 2, arguments.length+1);
				} else {
					var self = arguments[0];
					widget = arguments[1];
					if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					if (pyjs_options.arg_count && arguments.length != 2) pyjs__exception_func_param(arguments.callee.__name__, 2, 2, arguments.length);
				}
				if (pyjs_options.arg_instance_type) {
					if (self.prototype.__md5__ !== '7420a16405647bd6b66b2922e6ae73a6') {
						if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
							pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
						}
					}
				}
				track={module:pyjamas.ui.AbsolutePanel, lineno:51};trackstack.push(track);
				track.module='pyjamas.ui.AbsolutePanel';
				track.lineno=51;
				track.lineno=52;
				self.checkWidgetParent(widget);
				track.lineno=53;
				track.lineno=53;
				var pyjs__ret = pyjamas.ui.AbsolutePanel.DOM.getIntAttribute(widget.getElement(), String('offsetTop'));
				trackstack.pop();track=trackstack.pop();trackstack.push(track);
				return pyjs__ret;
			}
			, function ( __kwargs, widget ) {
				if (typeof widget == 'undefined') {
					widget=__kwargs.widget;
					delete __kwargs.widget;
				} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.widget != 'undefined') {
					pyjs__exception_func_multiple_values('getWidgetTop', 'widget');
				}
				if (pyjs_options.arg_kwarg_unexpected_keyword) {
					for (var i in __kwargs) {
						pyjs__exception_func_unexpected_keyword('getWidgetTop', i);
					}
				}
				var __r = [widget];
				for (var pyjs__va_arg = 2;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
					__r.push(arguments[pyjs__va_arg]);
				}

				return __r;
			});
			cls_definition.checkWidgetParent = pyjs__bind_method(cls_instance, 'checkWidgetParent', function(widget) {
				if (this.__is_instance__ === true) {
					var self = this;
					if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 2, 2, arguments.length+1);
				} else {
					var self = arguments[0];
					widget = arguments[1];
					if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					if (pyjs_options.arg_count && arguments.length != 2) pyjs__exception_func_param(arguments.callee.__name__, 2, 2, arguments.length);
				}
				if (pyjs_options.arg_instance_type) {
					if (self.prototype.__md5__ !== '7420a16405647bd6b66b2922e6ae73a6') {
						if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
							pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
						}
					}
				}
				track={module:pyjamas.ui.AbsolutePanel, lineno:55};trackstack.push(track);
				track.module='pyjamas.ui.AbsolutePanel';
				track.lineno=55;
				track.lineno=56;
				if (pyjslib.bool((widget.getParent() != self))) {
					track.lineno=57;
					console.error(String('Widget must be a child of this panel.'));
				}
				trackstack.pop();track=trackstack.pop();trackstack.push(track);
				return null;
			}
			, function ( __kwargs, widget ) {
				if (typeof widget == 'undefined') {
					widget=__kwargs.widget;
					delete __kwargs.widget;
				} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.widget != 'undefined') {
					pyjs__exception_func_multiple_values('checkWidgetParent', 'widget');
				}
				if (pyjs_options.arg_kwarg_unexpected_keyword) {
					for (var i in __kwargs) {
						pyjs__exception_func_unexpected_keyword('checkWidgetParent', i);
					}
				}
				var __r = [widget];
				for (var pyjs__va_arg = 2;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
					__r.push(arguments[pyjs__va_arg]);
				}

				return __r;
			});
			return pyjs__class_function(cls_instance, cls_definition, 
			                            new Array(pyjamas.ui.AbsolutePanel.ComplexPanel));
		})();

	} catch (pyjs_attr_err) {throw pyjslib._errorMapping(pyjs_attr_err)};
return this;
}; /* end pyjamas.ui.AbsolutePanel */ 




pyjamas.ui.AbsolutePanel_loaded_fn = function() {
}

pyjamas.ui.AbsolutePanel_prepare_mod = function() {
    if ((typeof (module_load_request['pyjamas.ui.AbsolutePanel']) == 'undefined') ||
        (module_load_request['pyjamas.ui.AbsolutePanel'] < 2)) {
        module_load_request['pyjamas.ui.AbsolutePanel'] = 2;
    }
    var modnames = new pyjslib.List([
		new pyjslib.List([
			'pyjamas']),
		new pyjslib.List([
			'pyjamas.DOM',
			'pyjamas.ui']),
		new pyjslib.List([
			]),
		new pyjslib.List([
			'pyjamas.ui.ComplexPanel'])
	]);
    sys.overrides.update(new pyjslib.Dict({
		'mozilla.pyjslib': 'mozilla.pyjslib',
		'mozilla.pyjamas.DOM': 'mozilla.pyjamas.DOM'
	}));
    path = sys.loadpath;
    /*
    pyjslib.preload_app_modules(path, modnames, pyjamas.ui.AbsolutePanel_loaded_fn,
                                            0,
                                            null);
                                            //'pyjamas.ui.AbsolutePanel');
                                            */
    //alert("module ajax loaded fn called pyjamas.ui.AbsolutePanel");

    if (sys.appname != 'pyjamas.ui.AbsolutePanel')
    {
        if (module_load_request['pyjamas.ui.AbsolutePanel'] < 3) {
            module_load_request['pyjamas.ui.AbsolutePanel'] = 3;
        }
    }
}

//alert("module ajax loaded pyjamas.ui.AbsolutePanel");

pyjamas.ui.AbsolutePanel_prepare_mod();


// pyjamas.ui.RootPanel

// module libs (usually imported javascript)



// module code

pyjamas.ui.RootPanel = function (__mod_name__) {
	if(pyjamas.ui.RootPanel.__was_initialized__) return;
	pyjamas.ui.RootPanel.__was_initialized__ = true;
	if (__mod_name__ == null) __mod_name__ = 'pyjamas.ui.RootPanel';
	var __name__ = pyjamas.ui.RootPanel.__name__ = __mod_name__;
	pyjamas.ui.RootPanel.__track_lines__ = new Array();
	var RootPanel = pyjamas.ui.RootPanel;

		pyjamas.ui.RootPanel.__track_lines__[1] = "pyjamas.ui.RootPanel.py, line 1:\n    # Copyright 2006 James Tauber and contributors";
		pyjamas.ui.RootPanel.__track_lines__[14] = "pyjamas.ui.RootPanel.py, line 14:\n    from __pyjamas__ import JS";
		pyjamas.ui.RootPanel.__track_lines__[15] = "pyjamas.ui.RootPanel.py, line 15:\n    from pyjamas import DOM";
		pyjamas.ui.RootPanel.__track_lines__[16] = "pyjamas.ui.RootPanel.py, line 16:\n    from pyjamas import Window";
		pyjamas.ui.RootPanel.__track_lines__[17] = "pyjamas.ui.RootPanel.py, line 17:\n    import pyjslib";
		pyjamas.ui.RootPanel.__track_lines__[19] = "pyjamas.ui.RootPanel.py, line 19:\n    from pyjamas.ui.AbsolutePanel import AbsolutePanel";
		pyjamas.ui.RootPanel.__track_lines__[21] = "pyjamas.ui.RootPanel.py, line 21:\n    rootPanels = {}";
		pyjamas.ui.RootPanel.__track_lines__[23] = "pyjamas.ui.RootPanel.py, line 23:\n    class RootPanelCls(AbsolutePanel):";
		pyjamas.ui.RootPanel.__track_lines__[24] = "pyjamas.ui.RootPanel.py, line 24:\n    def __init__(self, element=None):";
		pyjamas.ui.RootPanel.__track_lines__[25] = "pyjamas.ui.RootPanel.py, line 25:\n    AbsolutePanel.__init__(self)";
		pyjamas.ui.RootPanel.__track_lines__[26] = "pyjamas.ui.RootPanel.py, line 26:\n    if element == None:";
		pyjamas.ui.RootPanel.__track_lines__[27] = "pyjamas.ui.RootPanel.py, line 27:\n    element = self.getBodyElement()";
		pyjamas.ui.RootPanel.__track_lines__[29] = "pyjamas.ui.RootPanel.py, line 29:\n    self.setElement(element)";
		pyjamas.ui.RootPanel.__track_lines__[30] = "pyjamas.ui.RootPanel.py, line 30:\n    self.onAttach()";
		pyjamas.ui.RootPanel.__track_lines__[32] = "pyjamas.ui.RootPanel.py, line 32:\n    def getBodyElement(self):";
		pyjamas.ui.RootPanel.__track_lines__[35] = "pyjamas.ui.RootPanel.py, line 33:\n    JS(\"\"\" ... \"\"\")";
		pyjamas.ui.RootPanel.__track_lines__[38] = "pyjamas.ui.RootPanel.py, line 37:\n    @classmethod ... def get(cls, id=None):";
		pyjamas.ui.RootPanel.__track_lines__[42] = "pyjamas.ui.RootPanel.py, line 42:\n    global rootPanels";
		pyjamas.ui.RootPanel.__track_lines__[44] = "pyjamas.ui.RootPanel.py, line 44:\n    if rootPanels.has_key(id):";
		pyjamas.ui.RootPanel.__track_lines__[45] = "pyjamas.ui.RootPanel.py, line 45:\n    return rootPanels[id]";
		pyjamas.ui.RootPanel.__track_lines__[47] = "pyjamas.ui.RootPanel.py, line 47:\n    element = None";
		pyjamas.ui.RootPanel.__track_lines__[48] = "pyjamas.ui.RootPanel.py, line 48:\n    if id:";
		pyjamas.ui.RootPanel.__track_lines__[49] = "pyjamas.ui.RootPanel.py, line 49:\n    element = DOM.getElementById(id)";
		pyjamas.ui.RootPanel.__track_lines__[50] = "pyjamas.ui.RootPanel.py, line 50:\n    if not element:";
		pyjamas.ui.RootPanel.__track_lines__[51] = "pyjamas.ui.RootPanel.py, line 51:\n    return None";
		pyjamas.ui.RootPanel.__track_lines__[53] = "pyjamas.ui.RootPanel.py, line 53:\n    if len(rootPanels) < 1:";
		pyjamas.ui.RootPanel.__track_lines__[54] = "pyjamas.ui.RootPanel.py, line 54:\n    cls.hookWindowClosing()";
		pyjamas.ui.RootPanel.__track_lines__[56] = "pyjamas.ui.RootPanel.py, line 56:\n    panel = RootPanel(element)";
		pyjamas.ui.RootPanel.__track_lines__[57] = "pyjamas.ui.RootPanel.py, line 57:\n    rootPanels[id] = panel";
		pyjamas.ui.RootPanel.__track_lines__[58] = "pyjamas.ui.RootPanel.py, line 58:\n    return panel";
		pyjamas.ui.RootPanel.__track_lines__[61] = "pyjamas.ui.RootPanel.py, line 60:\n    @classmethod ... def hookWindowClosing(cls):";
		pyjamas.ui.RootPanel.__track_lines__[62] = "pyjamas.ui.RootPanel.py, line 62:\n    Window.addWindowCloseListener(cls)";
		pyjamas.ui.RootPanel.__track_lines__[65] = "pyjamas.ui.RootPanel.py, line 64:\n    @classmethod ... def onWindowClosed(cls):";
		pyjamas.ui.RootPanel.__track_lines__[66] = "pyjamas.ui.RootPanel.py, line 66:\n    global rootPanels";
		pyjamas.ui.RootPanel.__track_lines__[68] = "pyjamas.ui.RootPanel.py, line 68:\n    for panel in rootPanels.itervalues():";
		pyjamas.ui.RootPanel.__track_lines__[69] = "pyjamas.ui.RootPanel.py, line 69:\n    panel.onDetach()";
		pyjamas.ui.RootPanel.__track_lines__[72] = "pyjamas.ui.RootPanel.py, line 71:\n    @classmethod ... def onWindowClosing(cls):";
		pyjamas.ui.RootPanel.__track_lines__[73] = "pyjamas.ui.RootPanel.py, line 73:\n    return None";
		pyjamas.ui.RootPanel.__track_lines__[75] = "pyjamas.ui.RootPanel.py, line 75:\n    def RootPanel(element=None):";
		pyjamas.ui.RootPanel.__track_lines__[76] = "pyjamas.ui.RootPanel.py, line 76:\n    if pyjslib.isString(element):";
		pyjamas.ui.RootPanel.__track_lines__[77] = "pyjamas.ui.RootPanel.py, line 77:\n    return RootPanelCls().get(element)";
		pyjamas.ui.RootPanel.__track_lines__[78] = "pyjamas.ui.RootPanel.py, line 78:\n    return RootPanelCls(element)";
	try {
		track.module='pyjamas.ui.RootPanel';
		track.lineno=1;
		track.lineno=14;
		track.lineno=15;
		modules['pyjamas'] = pyjamas();
		pyjslib.import_module(sys.loadpath, 'pyjamas.ui.RootPanel', 'pyjamas', 0, false);
		track.module='pyjamas.ui.RootPanel';

		modules['pyjamas'] = pyjamas();
		pyjslib.import_module(sys.loadpath, 'pyjamas.ui.RootPanel', 'pyjamas', 0, false);
		track.module='pyjamas.ui.RootPanel';

		modules['pyjamas.DOM'] = pyjamas.DOM();
		pyjslib.import_module(sys.loadpath, 'pyjamas.ui.RootPanel', 'pyjamas.DOM', 0, false);
		track.module='pyjamas.ui.RootPanel';

		pyjamas.ui.RootPanel.DOM = pyjamas.DOM;
		track.lineno=16;
		modules['pyjamas'] = pyjamas();
		pyjslib.import_module(sys.loadpath, 'pyjamas.ui.RootPanel', 'pyjamas', 0, false);
		track.module='pyjamas.ui.RootPanel';

		modules['pyjamas'] = pyjamas();
		pyjslib.import_module(sys.loadpath, 'pyjamas.ui.RootPanel', 'pyjamas', 0, false);
		track.module='pyjamas.ui.RootPanel';

		modules['pyjamas.Window'] = pyjamas.Window();
		pyjslib.import_module(sys.loadpath, 'pyjamas.ui.RootPanel', 'pyjamas.Window', 0, false);
		track.module='pyjamas.ui.RootPanel';

		pyjamas.ui.RootPanel.Window = pyjamas.Window;
		track.lineno=17;
		modules['pyjslib'] = pyjslib();
		pyjslib.import_module(sys.loadpath, 'pyjamas.ui.RootPanel', 'pyjslib', 0, false);
		track.module='pyjamas.ui.RootPanel';

		pyjamas.ui.RootPanel.pyjslib = pyjslib;
		track.lineno=19;
		modules['pyjamas'] = pyjamas();
		pyjslib.import_module(sys.loadpath, 'pyjamas.ui.RootPanel', 'pyjamas', 0, false);
		track.module='pyjamas.ui.RootPanel';

		modules['pyjamas.ui'] = pyjamas.ui();
		pyjslib.import_module(sys.loadpath, 'pyjamas.ui.RootPanel', 'pyjamas.ui', 0, false);
		track.module='pyjamas.ui.RootPanel';

		modules['pyjamas.ui.AbsolutePanel'] = pyjamas.ui.AbsolutePanel();
		pyjslib.import_module(sys.loadpath, 'pyjamas.ui.RootPanel', 'pyjamas.ui.AbsolutePanel', 0, false);
		track.module='pyjamas.ui.RootPanel';

		pyjamas.ui.RootPanel.AbsolutePanel = pyjamas.ui.AbsolutePanel.AbsolutePanel;
		track.lineno=21;
		pyjamas.ui.RootPanel.rootPanels = new pyjslib.Dict([]);
		track.lineno=23;
		pyjamas.ui.RootPanel.RootPanelCls = (function(){
			var cls_instance = pyjs__class_instance('RootPanelCls');
			var cls_definition = new Object();
			cls_definition.__md5__ = '24c7768fb1f729de3be099abf4c7b459';
			cls_definition.__init__ = pyjs__bind_method(cls_instance, '__init__', function(element) {
				if (this.__is_instance__ === true) {
					var self = this;
					if (pyjs_options.arg_count && (arguments.length < 0 || arguments.length > 1)) pyjs__exception_func_param(arguments.callee.__name__, 1, 2, arguments.length+1);
				} else {
					var self = arguments[0];
					element = arguments[1];
					if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					if (pyjs_options.arg_count && (arguments.length < 1 || arguments.length > 2)) pyjs__exception_func_param(arguments.callee.__name__, 1, 2, arguments.length);
				}
				if (pyjs_options.arg_instance_type) {
					if (self.prototype.__md5__ !== '24c7768fb1f729de3be099abf4c7b459') {
						if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
							pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
						}
					}
				}
				if (typeof element == 'undefined') element=null;
				track={module:pyjamas.ui.RootPanel, lineno:24};trackstack.push(track);
				track.module='pyjamas.ui.RootPanel';
				track.lineno=24;
				track.lineno=25;
				pyjamas.ui.RootPanel.AbsolutePanel.__init__(self);
				track.lineno=26;
				if (pyjslib.bool(pyjslib.eq(element, null))) {
					track.lineno=27;
					element = self.getBodyElement();
				}
				track.lineno=29;
				self.setElement(element);
				track.lineno=30;
				self.onAttach();
				trackstack.pop();track=trackstack.pop();trackstack.push(track);
				return null;
			}
			, function ( __kwargs, element ) {
				if (typeof element == 'undefined') {
					element=__kwargs.element;
					delete __kwargs.element;
				} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.element != 'undefined') {
					pyjs__exception_func_multiple_values('__init__', 'element');
				}
				if (pyjs_options.arg_kwarg_unexpected_keyword) {
					for (var i in __kwargs) {
						pyjs__exception_func_unexpected_keyword('__init__', i);
					}
				}
				var __r = [element];
				for (var pyjs__va_arg = 2;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
					__r.push(arguments[pyjs__va_arg]);
				}

				return __r;
			});
			cls_definition.getBodyElement = pyjs__bind_method(cls_instance, 'getBodyElement', function() {
				if (this.__is_instance__ === true) {
					var self = this;
					if (pyjs_options.arg_count && arguments.length != 0) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length+1);
				} else {
					var self = arguments[0];
					if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length);
				}
				if (pyjs_options.arg_instance_type) {
					if (self.prototype.__md5__ !== '24c7768fb1f729de3be099abf4c7b459') {
						if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
							pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
						}
					}
				}

        return $doc.body;
        
			}
			, function ( __kwargs ) {
				if (pyjs_options.arg_kwarg_unexpected_keyword) {
					for (var i in __kwargs) {
						pyjs__exception_func_unexpected_keyword('getBodyElement', i);
					}
				}
				var __r = [];
				for (var pyjs__va_arg = 1;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
					__r.push(arguments[pyjs__va_arg]);
				}

				return __r;
			});
			cls_definition.get = pyjs__bind_method(cls_instance, 'get', function(id) {
    if (pyjs_options.arg_is_instance && this.__is_instance__ !== true && this.__is_instance__ !== false) pyjs__exception_func_class_expected(arguments.callee.__name__, arguments.callee.__class__.__name__);
    if (pyjs_options.arg_count && (arguments.length < 0 || arguments.length > 1)) pyjs__exception_func_param(arguments.callee.__name__, 1, 2, arguments.length);
    var cls = this.prototype;
				if (typeof id == 'undefined') id=null;
				track={module:pyjamas.ui.RootPanel, lineno:38};trackstack.push(track);
				track.module='pyjamas.ui.RootPanel';
				track.lineno=38;
				track.lineno=42;
				track.lineno=44;
				if (pyjslib.bool(pyjamas.ui.RootPanel.rootPanels.has_key(id))) {
					track.lineno=45;
					track.lineno=45;
					var pyjs__ret = pyjamas.ui.RootPanel.rootPanels.__getitem__(id);
					trackstack.pop();track=trackstack.pop();trackstack.push(track);
					return pyjs__ret;
				}
				track.lineno=47;
				var element = null;
				track.lineno=48;
				if (pyjslib.bool(id)) {
					track.lineno=49;
					element = pyjamas.ui.RootPanel.DOM.getElementById(id);
					track.lineno=50;
					if (pyjslib.bool(!(element))) {
						track.lineno=51;
						track.lineno=51;
						var pyjs__ret = null;
						trackstack.pop();track=trackstack.pop();trackstack.push(track);
						return pyjs__ret;
					}
				}
				track.lineno=53;
				if (pyjslib.bool((pyjslib.cmp(pyjslib.len(pyjamas.ui.RootPanel.rootPanels), 1) == -1))) {
					track.lineno=54;
					cls.hookWindowClosing();
				}
				track.lineno=56;
				var panel = pyjamas.ui.RootPanel.RootPanel(element);
				track.lineno=57;
				pyjamas.ui.RootPanel.rootPanels.__setitem__(id, panel);
				track.lineno=58;
				track.lineno=58;
				var pyjs__ret = panel;
				trackstack.pop();track=trackstack.pop();trackstack.push(track);
				return pyjs__ret;
			}
			, function ( __kwargs, id ) {
				if (typeof id == 'undefined') {
					id=__kwargs.id;
					delete __kwargs.id;
				} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.id != 'undefined') {
					pyjs__exception_func_multiple_values('get', 'id');
				}
				if (pyjs_options.arg_kwarg_unexpected_keyword) {
					for (var i in __kwargs) {
						pyjs__exception_func_unexpected_keyword('get', i);
					}
				}
				var __r = [id];
				for (var pyjs__va_arg = 2;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
					__r.push(arguments[pyjs__va_arg]);
				}

				return __r;
			});
			cls_definition.hookWindowClosing = pyjs__bind_method(cls_instance, 'hookWindowClosing', function() {
    if (pyjs_options.arg_is_instance && this.__is_instance__ !== true && this.__is_instance__ !== false) pyjs__exception_func_class_expected(arguments.callee.__name__, arguments.callee.__class__.__name__);
    if (pyjs_options.arg_count && arguments.length != 0) pyjs__exception_func_param(arguments.callee.__name__, 1, 0, arguments.length);
    var cls = this.prototype;
				track={module:pyjamas.ui.RootPanel, lineno:61};trackstack.push(track);
				track.module='pyjamas.ui.RootPanel';
				track.lineno=61;
				track.lineno=62;
				pyjamas.ui.RootPanel.Window.addWindowCloseListener(cls);
				trackstack.pop();track=trackstack.pop();trackstack.push(track);
				return null;
			}
			, function ( __kwargs ) {
				if (pyjs_options.arg_kwarg_unexpected_keyword) {
					for (var i in __kwargs) {
						pyjs__exception_func_unexpected_keyword('hookWindowClosing', i);
					}
				}
				var __r = [];
				for (var pyjs__va_arg = 1;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
					__r.push(arguments[pyjs__va_arg]);
				}

				return __r;
			});
			cls_definition.onWindowClosed = pyjs__bind_method(cls_instance, 'onWindowClosed', function() {
    if (pyjs_options.arg_is_instance && this.__is_instance__ !== true && this.__is_instance__ !== false) pyjs__exception_func_class_expected(arguments.callee.__name__, arguments.callee.__class__.__name__);
    if (pyjs_options.arg_count && arguments.length != 0) pyjs__exception_func_param(arguments.callee.__name__, 1, 0, arguments.length);
    var cls = this.prototype;
				track={module:pyjamas.ui.RootPanel, lineno:65};trackstack.push(track);
				track.module='pyjamas.ui.RootPanel';
				track.lineno=65;
				track.lineno=66;
				track.lineno=68;
				var pyjs__trackstack_size_1=trackstack.length;
				var __panel = pyjamas.ui.RootPanel.rootPanels.itervalues().__iter__();
				try {
					while (true) {
						var panel = __panel.next();
						
						track.lineno=69;
						panel.onDetach();
					}
				} catch (e) {
					if (e.__name__ != 'StopIteration') {
						throw e;
					}
				}
				if (trackstack.length > pyjs__trackstack_size_1) {
					trackstack = trackstack.slice(0,pyjs__trackstack_size_1);
					track = trackstack.slice(-1)[0];
				}
				track.module='pyjamas.ui.RootPanel';
				trackstack.pop();track=trackstack.pop();trackstack.push(track);
				return null;
			}
			, function ( __kwargs ) {
				if (pyjs_options.arg_kwarg_unexpected_keyword) {
					for (var i in __kwargs) {
						pyjs__exception_func_unexpected_keyword('onWindowClosed', i);
					}
				}
				var __r = [];
				for (var pyjs__va_arg = 1;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
					__r.push(arguments[pyjs__va_arg]);
				}

				return __r;
			});
			cls_definition.onWindowClosing = pyjs__bind_method(cls_instance, 'onWindowClosing', function() {
    if (pyjs_options.arg_is_instance && this.__is_instance__ !== true && this.__is_instance__ !== false) pyjs__exception_func_class_expected(arguments.callee.__name__, arguments.callee.__class__.__name__);
    if (pyjs_options.arg_count && arguments.length != 0) pyjs__exception_func_param(arguments.callee.__name__, 1, 0, arguments.length);
    var cls = this.prototype;
				track={module:pyjamas.ui.RootPanel, lineno:72};trackstack.push(track);
				track.module='pyjamas.ui.RootPanel';
				track.lineno=72;
				track.lineno=73;
				track.lineno=73;
				var pyjs__ret = null;
				trackstack.pop();track=trackstack.pop();trackstack.push(track);
				return pyjs__ret;
			}
			, function ( __kwargs ) {
				if (pyjs_options.arg_kwarg_unexpected_keyword) {
					for (var i in __kwargs) {
						pyjs__exception_func_unexpected_keyword('onWindowClosing', i);
					}
				}
				var __r = [];
				for (var pyjs__va_arg = 1;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
					__r.push(arguments[pyjs__va_arg]);
				}

				return __r;
			});
			return pyjs__class_function(cls_instance, cls_definition, 
			                            new Array(pyjamas.ui.RootPanel.AbsolutePanel));
		})();
		track.lineno=75;
		pyjamas.ui.RootPanel.RootPanel = function(element) {
			if (pyjs_options.arg_count && (arguments.length < 0 || arguments.length > 1)) pyjs__exception_func_param(arguments.callee.__name__, 0, 1, arguments.length);
			if (typeof element == 'undefined') element=null;
			track={module:'pyjamas.ui.RootPanel',lineno:75};trackstack.push(track);
			track.module='pyjamas.ui.RootPanel';
			track.lineno=75;
			track.lineno=76;
			if (pyjslib.bool(pyjamas.ui.RootPanel.pyjslib.isString(element))) {
				track.lineno=77;
				track.lineno=77;
				var pyjs__ret = pyjamas.ui.RootPanel.RootPanelCls().get(element);
				trackstack.pop();track=trackstack.pop();trackstack.push(track);
				return pyjs__ret;
			}
			track.lineno=78;
			track.lineno=78;
			var pyjs__ret = pyjamas.ui.RootPanel.RootPanelCls(element);
			trackstack.pop();track=trackstack.pop();trackstack.push(track);
			return pyjs__ret;
		};
		pyjamas.ui.RootPanel.RootPanel.__name__ = 'RootPanel';

		pyjamas.ui.RootPanel.RootPanel.parse_kwargs = function ( __kwargs, element ) {
			if (typeof element == 'undefined') {
				element=__kwargs.element;
				delete __kwargs.element;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.element != 'undefined') {
				pyjs__exception_func_multiple_values('pyjamas.ui.RootPanel.RootPanel', 'element');
			}
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('pyjamas.ui.RootPanel.RootPanel', i);
				}
			}
			var __r = [element];
			for (var pyjs__va_arg = 2;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		};

	} catch (pyjs_attr_err) {throw pyjslib._errorMapping(pyjs_attr_err)};
return this;
}; /* end pyjamas.ui.RootPanel */ 




pyjamas.ui.RootPanel_loaded_fn = function() {
}

pyjamas.ui.RootPanel_prepare_mod = function() {
    if ((typeof (module_load_request['pyjamas.ui.RootPanel']) == 'undefined') ||
        (module_load_request['pyjamas.ui.RootPanel'] < 2)) {
        module_load_request['pyjamas.ui.RootPanel'] = 2;
    }
    var modnames = new pyjslib.List([
		new pyjslib.List([
			'pyjamas']),
		new pyjslib.List([
			'pyjamas.DOM',
			'pyjamas.ui']),
		new pyjslib.List([
			]),
		new pyjslib.List([
			'pyjamas.Window',
			'pyjamas.ui.AbsolutePanel'])
	]);
    sys.overrides.update(new pyjslib.Dict({
		'mozilla.pyjslib': 'mozilla.pyjslib',
		'mozilla.pyjamas.DOM': 'mozilla.pyjamas.DOM'
	}));
    path = sys.loadpath;
    /*
    pyjslib.preload_app_modules(path, modnames, pyjamas.ui.RootPanel_loaded_fn,
                                            0,
                                            null);
                                            //'pyjamas.ui.RootPanel');
                                            */
    //alert("module ajax loaded fn called pyjamas.ui.RootPanel");

    if (sys.appname != 'pyjamas.ui.RootPanel')
    {
        if (module_load_request['pyjamas.ui.RootPanel'] < 3) {
            module_load_request['pyjamas.ui.RootPanel'] = 3;
        }
    }
}

//alert("module ajax loaded pyjamas.ui.RootPanel");

pyjamas.ui.RootPanel_prepare_mod();


// LlkApp

// module libs (usually imported javascript)



// module code

var LlkApp = function (__mod_name__) {
	if(LlkApp.__was_initialized__) return;
	LlkApp.__was_initialized__ = true;
	if (__mod_name__ == null) __mod_name__ = 'LlkApp';
	var __name__ = LlkApp.__name__ = __mod_name__;
	LlkApp.__track_lines__ = new Array();
		LlkApp.__track_lines__[1] = "LlkApp.py, line 1:\n    from pyjamas import DOM";
		LlkApp.__track_lines__[2] = "LlkApp.py, line 2:\n    from pyjamas.Canvas2D import Canvas, CanvasImage";
		LlkApp.__track_lines__[3] = "LlkApp.py, line 3:\n    from pyjamas.ui.Image import Image";
		LlkApp.__track_lines__[4] = "LlkApp.py, line 4:\n    from pyjamas.ui.RootPanel import RootPanel";
		LlkApp.__track_lines__[5] = "LlkApp.py, line 5:\n    from pyjamas import Window";
		LlkApp.__track_lines__[6] = "LlkApp.py, line 6:\n    from config import uwidth,uheight,cwidth,cheight";
		LlkApp.__track_lines__[7] = "LlkApp.py, line 7:\n    from pyjamas.Timer import Timer";
		LlkApp.__track_lines__[8] = "LlkApp.py, line 8:\n    from random import randint";
		LlkApp.__track_lines__[9] = "LlkApp.py, line 9:\n    import math";
		LlkApp.__track_lines__[10] = "LlkApp.py, line 10:\n    from lianliankan import checkllk";
		LlkApp.__track_lines__[12] = "LlkApp.py, line 12:\n    def sample(population, k):";
		LlkApp.__track_lines__[13] = "LlkApp.py, line 13:\n    n = len(population)";
		LlkApp.__track_lines__[14] = "LlkApp.py, line 14:\n    if not (0 <= k and k <= n):";
		LlkApp.__track_lines__[15] = "LlkApp.py, line 15:\n    raise ValueError, \"sample larger than population\"";
		LlkApp.__track_lines__[16] = "LlkApp.py, line 16:\n    random = math.random";
		LlkApp.__track_lines__[17] = "LlkApp.py, line 17:\n    _int = int";
		LlkApp.__track_lines__[18] = "LlkApp.py, line 18:\n    result = []";
		LlkApp.__track_lines__[19] = "LlkApp.py, line 19:\n    for i in range(k):";
		LlkApp.__track_lines__[20] = "LlkApp.py, line 20:\n    result.append(None)";
		LlkApp.__track_lines__[21] = "LlkApp.py, line 21:\n    setsize = 21        # size of a small set minus size of an empty list";
		LlkApp.__track_lines__[22] = "LlkApp.py, line 22:\n    if k > 5:";
		LlkApp.__track_lines__[23] = "LlkApp.py, line 23:\n    setsize += 4 ** math.ceil(math.log(k * 3, 4)) # table size for big sets";
		LlkApp.__track_lines__[24] = "LlkApp.py, line 24:\n    if n <= setsize or hasattr(population, \"keys\"):";
		LlkApp.__track_lines__[27] = "LlkApp.py, line 27:\n    pool = list(population)";
		LlkApp.__track_lines__[28] = "LlkApp.py, line 28:\n    for i in range(k):         # invariant:  non-selected at [0,n-i)";
		LlkApp.__track_lines__[29] = "LlkApp.py, line 29:\n    j = _int(random() * (n-i))";
		LlkApp.__track_lines__[30] = "LlkApp.py, line 30:\n    result[i] = pool[j]";
		LlkApp.__track_lines__[31] = "LlkApp.py, line 31:\n    pool[j] = pool[n-i-1]   # move non-selected item into vacancy";
		LlkApp.__track_lines__[33] = "LlkApp.py, line 33:\n    try:";
		LlkApp.__track_lines__[34] = "LlkApp.py, line 34:\n    selected = set()";
		LlkApp.__track_lines__[35] = "LlkApp.py, line 35:\n    selected_add = selected.add";
		LlkApp.__track_lines__[36] = "LlkApp.py, line 36:\n    for i in range(k):";
		LlkApp.__track_lines__[37] = "LlkApp.py, line 37:\n    j = _int(random() * n)";
		LlkApp.__track_lines__[38] = "LlkApp.py, line 38:\n    while j in selected:";
		LlkApp.__track_lines__[39] = "LlkApp.py, line 39:\n    j = _int(random() * n)";
		LlkApp.__track_lines__[40] = "LlkApp.py, line 40:\n    selected_add(j)";
		LlkApp.__track_lines__[41] = "LlkApp.py, line 41:\n    result[i] = population[j]";
		LlkApp.__track_lines__[43] = "LlkApp.py, line 43:\n    if isinstance(population, list):";
		LlkApp.__track_lines__[44] = "LlkApp.py, line 44:\n    raise";
		LlkApp.__track_lines__[45] = "LlkApp.py, line 45:\n    return self.sample(tuple(population), k)";
		LlkApp.__track_lines__[46] = "LlkApp.py, line 46:\n    return result";
		LlkApp.__track_lines__[48] = "LlkApp.py, line 48:\n    def trace(func):";
		LlkApp.__track_lines__[49] = "LlkApp.py, line 49:\n    def new_func(*args, **kwargs):";
		LlkApp.__track_lines__[50] = "LlkApp.py, line 50:\n    result = func(*args, **kwargs)";
		LlkApp.__track_lines__[51] = "LlkApp.py, line 51:\n    console.log(func)";
		LlkApp.__track_lines__[52] = "LlkApp.py, line 52:\n    console.log(args, kwargs)";
		LlkApp.__track_lines__[53] = "LlkApp.py, line 53:\n    console.log(result)";
		LlkApp.__track_lines__[54] = "LlkApp.py, line 54:\n    return result";
		LlkApp.__track_lines__[55] = "LlkApp.py, line 55:\n    return new_func";
		LlkApp.__track_lines__[57] = "LlkApp.py, line 57:\n    class ImgObj(object):";
		LlkApp.__track_lines__[58] = "LlkApp.py, line 58:\n    def __init__(self, img, xth, yth):";
		LlkApp.__track_lines__[59] = "LlkApp.py, line 59:\n    self.img = img";
		LlkApp.__track_lines__[60] = "LlkApp.py, line 60:\n    self.x,self.y = xth*uwidth,yth*uheight";
		LlkApp.__track_lines__[61] = "LlkApp.py, line 61:\n    def draw(self, ctx, x, y):";
		LlkApp.__track_lines__[62] = "LlkApp.py, line 62:\n    ctx.drawImage(self.img, self.x, self.y, uwidth, uheight,";
		LlkApp.__track_lines__[65] = "LlkApp.py, line 65:\n    class BasicBox(object):";
		LlkApp.__track_lines__[66] = "LlkApp.py, line 66:\n    def __init__(self, position, imgobj, app):";
		LlkApp.__track_lines__[67] = "LlkApp.py, line 67:\n    self.img = imgobj";
		LlkApp.__track_lines__[68] = "LlkApp.py, line 68:\n    self.xth,self.yth = position";
		LlkApp.__track_lines__[69] = "LlkApp.py, line 69:\n    self.x,self.y = self.xth*uwidth,self.yth*uheight";
		LlkApp.__track_lines__[70] = "LlkApp.py, line 70:\n    self.app = app";
		LlkApp.__track_lines__[71] = "LlkApp.py, line 71:\n    self.ctx = app.context";
		LlkApp.__track_lines__[72] = "LlkApp.py, line 72:\n    self.selected = False";
		LlkApp.__track_lines__[73] = "LlkApp.py, line 73:\n    self.alive = True";
		LlkApp.__track_lines__[74] = "LlkApp.py, line 74:\n    def update(self, ticks):";
		LlkApp.__track_lines__[75] = "LlkApp.py, line 75:\n    return False";
		LlkApp.__track_lines__[77] = "LlkApp.py, line 77:\n    def draw(self):";
		LlkApp.__track_lines__[78] = "LlkApp.py, line 78:\n    if not self.alive:";
		LlkApp.__track_lines__[79] = "LlkApp.py, line 79:\n    return False";
		LlkApp.__track_lines__[80] = "LlkApp.py, line 80:\n    ctx = self.ctx";
		LlkApp.__track_lines__[81] = "LlkApp.py, line 81:\n    self.img.draw(ctx, self.x, self.y)";
		LlkApp.__track_lines__[82] = "LlkApp.py, line 82:\n    if self.selected:";
		LlkApp.__track_lines__[84] = "LlkApp.py, line 84:\n    ctx.strokeRect(self.x+1, self.y+1, uwidth-2, uheight-2)";
		LlkApp.__track_lines__[85] = "LlkApp.py, line 85:\n    def toggleSelect(self):";
		LlkApp.__track_lines__[86] = "LlkApp.py, line 86:\n    self.selected = not self.selected";
		LlkApp.__track_lines__[87] = "LlkApp.py, line 87:\n    self.draw()";
		LlkApp.__track_lines__[88] = "LlkApp.py, line 88:\n    def doSelect(self):";
		LlkApp.__track_lines__[89] = "LlkApp.py, line 89:\n    self.selected = True";
		LlkApp.__track_lines__[90] = "LlkApp.py, line 90:\n    self.draw()";
		LlkApp.__track_lines__[91] = "LlkApp.py, line 91:\n    def unSelect(self):";
		LlkApp.__track_lines__[92] = "LlkApp.py, line 92:\n    self.selected = False";
		LlkApp.__track_lines__[93] = "LlkApp.py, line 93:\n    self.draw()";
		LlkApp.__track_lines__[94] = "LlkApp.py, line 94:\n    def clear(self):";
		LlkApp.__track_lines__[95] = "LlkApp.py, line 95:\n    self.ctx.clearRect(self.x, self.y, uwidth, uheight)";
		LlkApp.__track_lines__[97] = "LlkApp.py, line 97:\n    def dead(self):";
		LlkApp.__track_lines__[98] = "LlkApp.py, line 98:\n    self.clear()";
		LlkApp.__track_lines__[99] = "LlkApp.py, line 99:\n    self.alive = False";
		LlkApp.__track_lines__[100] = "LlkApp.py, line 100:\n    class LlkCanvas(Canvas):";
		LlkApp.__track_lines__[101] = "LlkApp.py, line 101:\n    def __init__(self, width, height):";
		LlkApp.__track_lines__[102] = "LlkApp.py, line 102:\n    super(LlkCanvas, self).__init__(width, height)";
		LlkApp.__track_lines__[103] = "LlkApp.py, line 103:\n    self.width,self.height = width,height";
		LlkApp.__track_lines__[104] = "LlkApp.py, line 104:\n    self.img = CanvasImage(\'output.png\', self)";
		LlkApp.__track_lines__[105] = "LlkApp.py, line 105:\n    self.objects = []";
		LlkApp.__track_lines__[106] = "LlkApp.py, line 106:\n    self.addClickListener(self.onClick)";
		LlkApp.__track_lines__[107] = "LlkApp.py, line 107:\n    self.addKeyboardListener(self)";
		LlkApp.__track_lines__[108] = "LlkApp.py, line 108:\n    self.selected_box = None";
		LlkApp.__track_lines__[109] = "LlkApp.py, line 109:\n    def init_map(self, width,height):";
		LlkApp.__track_lines__[110] = "LlkApp.py, line 110:\n    self.map_width,self.map_height = width,height";
		LlkApp.__track_lines__[111] = "LlkApp.py, line 111:\n    self.map = []";
		LlkApp.__track_lines__[112] = "LlkApp.py, line 112:\n    for x in range(self.map_height):";
		LlkApp.__track_lines__[113] = "LlkApp.py, line 113:\n    line = []";
		LlkApp.__track_lines__[114] = "LlkApp.py, line 114:\n    for y in range(self.map_width):";
		LlkApp.__track_lines__[115] = "LlkApp.py, line 115:\n    line.append(0)";
		LlkApp.__track_lines__[116] = "LlkApp.py, line 116:\n    self.map.append(line)";
		LlkApp.__track_lines__[117] = "LlkApp.py, line 117:\n    def onTick(self, tick, force_draw=False):";
		LlkApp.__track_lines__[118] = "LlkApp.py, line 118:\n    updated = False";
		LlkApp.__track_lines__[119] = "LlkApp.py, line 119:\n    for obj in self.objects:";
		LlkApp.__track_lines__[120] = "LlkApp.py, line 120:\n    if obj.alive and obj.update(tick):";
		LlkApp.__track_lines__[121] = "LlkApp.py, line 121:\n    updated = True";
		LlkApp.__track_lines__[122] = "LlkApp.py, line 122:\n    if updated or force_draw:";
		LlkApp.__track_lines__[123] = "LlkApp.py, line 123:\n    ctx = self.context";
		LlkApp.__track_lines__[124] = "LlkApp.py, line 124:\n    ctx.lineWidth = 2";
		LlkApp.__track_lines__[125] = "LlkApp.py, line 125:\n    ctx.clearRect(0,0,self.width,self.height)";
		LlkApp.__track_lines__[126] = "LlkApp.py, line 126:\n    for obj in self.objects:";
		LlkApp.__track_lines__[127] = "LlkApp.py, line 127:\n    if obj.alive:";
		LlkApp.__track_lines__[128] = "LlkApp.py, line 128:\n    obj.draw()";
		LlkApp.__track_lines__[129] = "LlkApp.py, line 129:\n    def onTimer(self, t=None):";
		LlkApp.__track_lines__[130] = "LlkApp.py, line 130:\n    self.ticks += 1";
		LlkApp.__track_lines__[131] = "LlkApp.py, line 131:\n    self.onTick(1)";
		LlkApp.__track_lines__[132] = "LlkApp.py, line 132:\n    def add(self, obj):";
		LlkApp.__track_lines__[133] = "LlkApp.py, line 133:\n    self.objects.append(obj)";
		LlkApp.__track_lines__[135] = "LlkApp.py, line 135:\n    def setBox(self, xth, yth, imgobj):";
		LlkApp.__track_lines__[136] = "LlkApp.py, line 136:\n    box = BasicBox( (xth,yth), imgobj, self)";
		LlkApp.__track_lines__[137] = "LlkApp.py, line 137:\n    self.map[yth][xth] = box";
		LlkApp.__track_lines__[138] = "LlkApp.py, line 138:\n    self.add(box)";
		LlkApp.__track_lines__[139] = "LlkApp.py, line 139:\n    def onClick(self, sender, evt):";
		LlkApp.__track_lines__[140] = "LlkApp.py, line 140:\n    x = DOM.eventGetClientX(evt)-DOM.getAbsoluteLeft(self.getElement())";
		LlkApp.__track_lines__[141] = "LlkApp.py, line 141:\n    y = DOM.eventGetClientY(evt)-DOM.getAbsoluteTop(self.getElement())";
		LlkApp.__track_lines__[142] = "LlkApp.py, line 142:\n    xth = int(x/uwidth)";
		LlkApp.__track_lines__[143] = "LlkApp.py, line 143:\n    yth = int(y/uheight)";
		LlkApp.__track_lines__[144] = "LlkApp.py, line 144:\n    box = self.map[yth][xth]";
		LlkApp.__track_lines__[145] = "LlkApp.py, line 145:\n    if not box:";
		LlkApp.__track_lines__[146] = "LlkApp.py, line 146:\n    return";
		LlkApp.__track_lines__[147] = "LlkApp.py, line 147:\n    box.toggleSelect()";
		LlkApp.__track_lines__[148] = "LlkApp.py, line 148:\n    if not box.selected:";
		LlkApp.__track_lines__[149] = "LlkApp.py, line 149:\n    self.selected_box = None";
		LlkApp.__track_lines__[151] = "LlkApp.py, line 151:\n    self.selected_box = box";
		LlkApp.__track_lines__[154] = "LlkApp.py, line 154:\n    self.selected_box.unSelect()";
		LlkApp.__track_lines__[155] = "LlkApp.py, line 155:\n    self.selected_box = box";
		LlkApp.__track_lines__[157] = "LlkApp.py, line 157:\n    sbox = self.selected_box";
		LlkApp.__track_lines__[158] = "LlkApp.py, line 158:\n    print \'check\'";
		LlkApp.__track_lines__[159] = "LlkApp.py, line 159:\n    result = False";
		LlkApp.__track_lines__[160] = "LlkApp.py, line 160:\n    if box.xth<sbox.xth:";
		LlkApp.__track_lines__[161] = "LlkApp.py, line 161:\n    print (box.yth,box.xth), (sbox.yth,sbox.xth)";
		LlkApp.__track_lines__[162] = "LlkApp.py, line 162:\n    result = checkllk(self.map, (box.yth,box.xth), (sbox.yth,sbox.xth))";
		LlkApp.__track_lines__[164] = "LlkApp.py, line 164:\n    print (sbox.yth,sbox.xth), (box.yth,box.xth)";
		LlkApp.__track_lines__[165] = "LlkApp.py, line 165:\n    result = checkllk(self.map, (sbox.yth,sbox.xth), (box.yth,box.xth))";
		LlkApp.__track_lines__[166] = "LlkApp.py, line 166:\n    if result:";
		LlkApp.__track_lines__[167] = "LlkApp.py, line 167:\n    print \'path:\', result";
		LlkApp.__track_lines__[168] = "LlkApp.py, line 168:\n    sbox.dead()";
		LlkApp.__track_lines__[169] = "LlkApp.py, line 169:\n    self.map[sbox.yth][sbox.xth] = 0";
		LlkApp.__track_lines__[170] = "LlkApp.py, line 170:\n    box.dead()";
		LlkApp.__track_lines__[171] = "LlkApp.py, line 171:\n    self.map[box.yth][box.xth] = 0";
		LlkApp.__track_lines__[172] = "LlkApp.py, line 172:\n    self.selected_box = None";
		LlkApp.__track_lines__[174] = "LlkApp.py, line 174:\n    print \'fail\'";
		LlkApp.__track_lines__[175] = "LlkApp.py, line 175:\n    self.selected_box.unSelect()";
		LlkApp.__track_lines__[176] = "LlkApp.py, line 176:\n    self.selected_box = box";
		LlkApp.__track_lines__[177] = "LlkApp.py, line 177:\n    def onKeyPress(self, sender, code, modifiers):";
		LlkApp.__track_lines__[178] = "LlkApp.py, line 178:\n    print code";
		LlkApp.__track_lines__[179] = "LlkApp.py, line 179:\n    if code == \'c\'.charCodeAt() and self.selected_box!=None:";
		LlkApp.__track_lines__[180] = "LlkApp.py, line 180:\n    sbox = self.selected_box";
		LlkApp.__track_lines__[181] = "LlkApp.py, line 181:\n    sbox.dead()";
		LlkApp.__track_lines__[182] = "LlkApp.py, line 182:\n    self.map[sbox.yth][sbox.xth] = 0";
		LlkApp.__track_lines__[183] = "LlkApp.py, line 183:\n    self.selected_box = None";
		LlkApp.__track_lines__[184] = "LlkApp.py, line 184:\n    def onKeyDown(self, sender, code, modifiers):";
		LlkApp.__track_lines__[185] = "LlkApp.py, line 185:\n    pass";
		LlkApp.__track_lines__[186] = "LlkApp.py, line 186:\n    def onKeyUp(self, sender, code, modifiers):";
		LlkApp.__track_lines__[187] = "LlkApp.py, line 187:\n    pass";
		LlkApp.__track_lines__[188] = "LlkApp.py, line 188:\n    def onLoad(self, img=None):";
		LlkApp.__track_lines__[189] = "LlkApp.py, line 189:\n    if self.img == img:";
		LlkApp.__track_lines__[190] = "LlkApp.py, line 190:\n    self.onTick(1, True)";
		LlkApp.__track_lines__[191] = "LlkApp.py, line 191:\n    Timer(object=canvas).scheduleRepeating(100)";
		LlkApp.__track_lines__[192] = "LlkApp.py, line 192:\n    def onError(self, img=None):";
		LlkApp.__track_lines__[194] = "LlkApp.py, line 194:\n    pass";
		LlkApp.__track_lines__[196] = "LlkApp.py, line 196:\n    if __name__ == \'__main__\':";
		LlkApp.__track_lines__[197] = "LlkApp.py, line 197:\n    canvas = LlkCanvas(int(Window.getClientWidth()), int(Window.getClientHeight()))";
		LlkApp.__track_lines__[198] = "LlkApp.py, line 198:\n    RootPanel().add(canvas)";
		LlkApp.__track_lines__[199] = "LlkApp.py, line 199:\n    img = canvas.img";
		LlkApp.__track_lines__[200] = "LlkApp.py, line 200:\n    imgobjs = []";
		LlkApp.__track_lines__[201] = "LlkApp.py, line 201:\n    for i in range(10):";
		LlkApp.__track_lines__[202] = "LlkApp.py, line 202:\n    xth = i%cwidth";
		LlkApp.__track_lines__[203] = "LlkApp.py, line 203:\n    yth = int(i/cheight)";
		LlkApp.__track_lines__[204] = "LlkApp.py, line 204:\n    print xth, yth";
		LlkApp.__track_lines__[205] = "LlkApp.py, line 205:\n    imgobj = ImgObj(img,xth,yth)";
		LlkApp.__track_lines__[206] = "LlkApp.py, line 206:\n    imgobjs.append(imgobj)";
		LlkApp.__track_lines__[209] = "LlkApp.py, line 209:\n    map = \\";
		LlkApp.__track_lines__[225] = "LlkApp.py, line 225:\n    positions = []";
		LlkApp.__track_lines__[226] = "LlkApp.py, line 226:\n    for y,line in enumerate(map):";
		LlkApp.__track_lines__[227] = "LlkApp.py, line 227:\n    for x,position in enumerate(line):";
		LlkApp.__track_lines__[228] = "LlkApp.py, line 228:\n    if position!=0:";
		LlkApp.__track_lines__[229] = "LlkApp.py, line 229:\n    positions.append( (x,y) )";
		LlkApp.__track_lines__[230] = "LlkApp.py, line 230:\n    canvas.init_map(len(map[0]), len(map))";
		LlkApp.__track_lines__[231] = "LlkApp.py, line 231:\n    candidate_imgs = []";
		LlkApp.__track_lines__[232] = "LlkApp.py, line 232:\n    img_count = len(imgobjs)";
		LlkApp.__track_lines__[233] = "LlkApp.py, line 233:\n    for i in range( len(positions)/2 ):";
		LlkApp.__track_lines__[234] = "LlkApp.py, line 234:\n    candidate_imgs.append(imgobjs[i%10])";
		LlkApp.__track_lines__[235] = "LlkApp.py, line 235:\n    for i in range(len(candidate_imgs)):";
		LlkApp.__track_lines__[236] = "LlkApp.py, line 236:\n    candidate_imgs.append(candidate_imgs[i])";
		LlkApp.__track_lines__[237] = "LlkApp.py, line 237:\n    random_imgs = sample(candidate_imgs, len(candidate_imgs))";
		LlkApp.__track_lines__[238] = "LlkApp.py, line 238:\n    for idx, pos in enumerate(positions):";
		LlkApp.__track_lines__[239] = "LlkApp.py, line 239:\n    x, y = pos";
		LlkApp.__track_lines__[240] = "LlkApp.py, line 240:\n    imgobj = random_imgs[idx]";
		LlkApp.__track_lines__[241] = "LlkApp.py, line 241:\n    canvas.setBox(x, y, imgobj)";
	try {
		track.module='LlkApp';
		track.lineno=1;
		track.lineno=1;
		modules['pyjamas'] = pyjamas();
		pyjslib.import_module(sys.loadpath, 'LlkApp', 'pyjamas', 0, false);
		track.module='LlkApp';

		modules['pyjamas'] = pyjamas();
		pyjslib.import_module(sys.loadpath, 'LlkApp', 'pyjamas', 0, false);
		track.module='LlkApp';

		modules['pyjamas.DOM'] = pyjamas.DOM();
		pyjslib.import_module(sys.loadpath, 'LlkApp', 'pyjamas.DOM', 0, false);
		track.module='LlkApp';

		LlkApp.DOM = pyjamas.DOM;
		track.lineno=2;
		modules['pyjamas'] = pyjamas();
		pyjslib.import_module(sys.loadpath, 'LlkApp', 'pyjamas', 0, false);
		track.module='LlkApp';

		modules['pyjamas.Canvas2D'] = pyjamas.Canvas2D();
		pyjslib.import_module(sys.loadpath, 'LlkApp', 'pyjamas.Canvas2D', 0, false);
		track.module='LlkApp';

		LlkApp.Canvas = pyjamas.Canvas2D.Canvas;
		LlkApp.CanvasImage = pyjamas.Canvas2D.CanvasImage;
		track.lineno=3;
		modules['pyjamas'] = pyjamas();
		pyjslib.import_module(sys.loadpath, 'LlkApp', 'pyjamas', 0, false);
		track.module='LlkApp';

		modules['pyjamas.ui'] = pyjamas.ui();
		pyjslib.import_module(sys.loadpath, 'LlkApp', 'pyjamas.ui', 0, false);
		track.module='LlkApp';

		modules['pyjamas.ui.Image'] = pyjamas.ui.Image();
		pyjslib.import_module(sys.loadpath, 'LlkApp', 'pyjamas.ui.Image', 0, false);
		track.module='LlkApp';

		LlkApp.Image = pyjamas.ui.Image.Image;
		track.lineno=4;
		modules['pyjamas'] = pyjamas();
		pyjslib.import_module(sys.loadpath, 'LlkApp', 'pyjamas', 0, false);
		track.module='LlkApp';

		modules['pyjamas.ui'] = pyjamas.ui();
		pyjslib.import_module(sys.loadpath, 'LlkApp', 'pyjamas.ui', 0, false);
		track.module='LlkApp';

		modules['pyjamas.ui.RootPanel'] = pyjamas.ui.RootPanel();
		pyjslib.import_module(sys.loadpath, 'LlkApp', 'pyjamas.ui.RootPanel', 0, false);
		track.module='LlkApp';

		LlkApp.RootPanel = pyjamas.ui.RootPanel.RootPanel;
		track.lineno=5;
		modules['pyjamas'] = pyjamas();
		pyjslib.import_module(sys.loadpath, 'LlkApp', 'pyjamas', 0, false);
		track.module='LlkApp';

		modules['pyjamas'] = pyjamas();
		pyjslib.import_module(sys.loadpath, 'LlkApp', 'pyjamas', 0, false);
		track.module='LlkApp';

		modules['pyjamas.Window'] = pyjamas.Window();
		pyjslib.import_module(sys.loadpath, 'LlkApp', 'pyjamas.Window', 0, false);
		track.module='LlkApp';

		LlkApp.Window = pyjamas.Window;
		track.lineno=6;
		modules['config'] = config();
		pyjslib.import_module(sys.loadpath, 'LlkApp', 'config', 0, false);
		track.module='LlkApp';

		LlkApp.uwidth = config.uwidth;
		LlkApp.uheight = config.uheight;
		LlkApp.cwidth = config.cwidth;
		LlkApp.cheight = config.cheight;
		track.lineno=7;
		modules['pyjamas'] = pyjamas();
		pyjslib.import_module(sys.loadpath, 'LlkApp', 'pyjamas', 0, false);
		track.module='LlkApp';

		modules['pyjamas.Timer'] = pyjamas.Timer();
		pyjslib.import_module(sys.loadpath, 'LlkApp', 'pyjamas.Timer', 0, false);
		track.module='LlkApp';

		LlkApp.Timer = pyjamas.Timer.Timer;
		track.lineno=8;
		modules['random'] = random();
		pyjslib.import_module(sys.loadpath, 'LlkApp', 'random', 0, false);
		track.module='LlkApp';

		LlkApp.randint = random.randint;
		track.lineno=9;
		modules['math'] = math();
		pyjslib.import_module(sys.loadpath, 'LlkApp', 'math', 0, false);
		track.module='LlkApp';

		LlkApp.math = math;
		track.lineno=10;
		modules['lianliankan'] = lianliankan();
		pyjslib.import_module(sys.loadpath, 'LlkApp', 'lianliankan', 0, false);
		track.module='LlkApp';

		LlkApp.checkllk = lianliankan.checkllk;
		track.lineno=12;
		LlkApp.sample = function(population, k) {
			if (pyjs_options.arg_count && arguments.length != 2) pyjs__exception_func_param(arguments.callee.__name__, 2, 2, arguments.length);
			track={module:'LlkApp',lineno:12};trackstack.push(track);
			track.module='LlkApp';
			track.lineno=12;
			track.lineno=13;
			var n = pyjslib.len(population);
			track.lineno=14;
			if (pyjslib.bool(!(((pyjslib.cmp(0, k) != 1)) && ((pyjslib.cmp(k, n) != 1))))) {
				track.lineno=15;

				var pyjs__raise_expr1 = pyjslib.ValueError;
				var pyjs__raise_expr2 = String('sample larger than population');
				if (pyjs__raise_expr2 !== null && pyjs__raise_expr1.__is_instance__ === true) {
					throw (pyjslib.TypeError('instance exception may not have a separate value'))
				}
				if (pyjslib.isinstance(pyjs__raise_expr2, pyjslib.Tuple)) {
					throw (pyjs__raise_expr1.apply(pyjs__raise_expr1, pyjs__raise_expr2.getArray()));
				} else {
					throw (pyjs__raise_expr1(pyjs__raise_expr2));
				}

			}
			track.lineno=16;
			var random = (LlkApp.math.random===undefined?(function(){throw new TypeError('LlkApp.math.random is undefined')})():(typeof LlkApp.math.random == 'function' && LlkApp.math.__is_instance__?pyjslib.getattr(LlkApp.math, 'random'):LlkApp.math.random));
			track.lineno=17;
			var _int = pyjslib.int;
			track.lineno=18;
			var result = new pyjslib.List([]);
			track.lineno=19;
			var pyjs__trackstack_size_1=trackstack.length;
			var __i = pyjslib.range(k).__iter__();
			try {
				while (true) {
					var i = __i.next();
					
					track.lineno=20;
					result.append(null);
				}
			} catch (e) {
				if (e.__name__ != 'StopIteration') {
					throw e;
				}
			}
			if (trackstack.length > pyjs__trackstack_size_1) {
				trackstack = trackstack.slice(0,pyjs__trackstack_size_1);
				track = trackstack.slice(-1)[0];
			}
			track.module='LlkApp';
			track.lineno=21;
			var setsize = 21;
			track.lineno=22;
			if (pyjslib.bool((pyjslib.cmp(k, 5) == 1))) {
				track.lineno=23;
				setsize += Math.pow(4,LlkApp.math.ceil(LlkApp.math.log( ( k * 3 ) , 4)));
			}
			track.lineno=24;
			if (pyjslib.bool(((pyjslib.cmp(n, setsize) != 1)) || (pyjslib.hasattr(population, String('keys'))))) {
				track.lineno=27;
				var pool = pyjslib.list(population);
				track.lineno=28;
				var pyjs__trackstack_size_1=trackstack.length;
				var __i = pyjslib.range(k).__iter__();
				try {
					while (true) {
						var i = __i.next();
						
						track.lineno=29;
						var j = _int( ( random() *  ( n - i )  ) );
						track.lineno=30;
						result.__setitem__(i, pool.__getitem__(j));
						track.lineno=31;
						pool.__setitem__(j, pool.__getitem__( (  ( n - i )  - 1 ) ));
					}
				} catch (e) {
					if (e.__name__ != 'StopIteration') {
						throw e;
					}
				}
				if (trackstack.length > pyjs__trackstack_size_1) {
					trackstack = trackstack.slice(0,pyjs__trackstack_size_1);
					track = trackstack.slice(-1)[0];
				}
				track.module='LlkApp';
			}
			else {
				track.lineno=33;
				var pyjs__trackstack_size_1 = trackstack.length;
				try {
					track.lineno=34;
					var selected = set();
					track.lineno=35;
					var selected_add = (selected.add===undefined?(function(){throw new TypeError('selected.add is undefined')})():(typeof selected.add == 'function' && selected.__is_instance__?pyjslib.getattr(selected, 'add'):selected.add));
					track.lineno=36;
					var pyjs__trackstack_size_2=trackstack.length;
					var __i = pyjslib.range(k).__iter__();
					try {
						while (true) {
							var i = __i.next();
							
							track.lineno=37;
							j = _int( ( random() * n ) );
							track.lineno=38;
    while (pyjslib.bool(selected.__contains__(j))) {
							track.lineno=39;
							j = _int( ( random() * n ) );
    }
							track.lineno=40;
							selected_add(j);
							track.lineno=41;
							result.__setitem__(i, population.__getitem__(j));
						}
					} catch (e) {
						if (e.__name__ != 'StopIteration') {
							throw e;
						}
					}
					if (trackstack.length > pyjs__trackstack_size_2) {
						trackstack = trackstack.slice(0,pyjs__trackstack_size_2);
						track = trackstack.slice(-1)[0];
					}
					track.module='LlkApp';
				} catch(pyjs_try_err) {
					pyjs_try_err = pyjslib._errorMapping(pyjs_try_err);
					var pyjs_try_err_name = (typeof pyjs_try_err.__name__ == 'undefined' ? pyjs_try_err.name : pyjs_try_err.__name__ );
					sys.__last_exception__ = {error: pyjs_try_err, module: LlkApp, try_lineno: 33};
					sys.save_exception_stack();
					if (trackstack.length > pyjs__trackstack_size_1) {
						trackstack = trackstack.slice(0,pyjs__trackstack_size_1);
						track = trackstack.slice(-1)[0];
					}
					track.module='LlkApp';
					if ((pyjs_try_err_name == pyjslib.TypeError.__name__)||(pyjs_try_err_name == pyjslib.KeyError.__name__)) {
						sys.__last_exception__.except_lineno = 42;
						var err = pyjs_try_err;
						track.lineno=43;
						if (pyjslib.bool(pyjslib.isinstance(population, pyjslib.list))) {
							track.lineno=44;
							throw (sys.__last_exception__?sys.__last_exception__.error:pyjslib.TypeError('exceptions must be classes, instances, or strings (deprecated), not NoneType'));
						}
						track.lineno=45;
						track.lineno=45;
						var pyjs__ret = self.sample(pyjslib.tuple(population), k);
						trackstack.pop();track=trackstack.pop();trackstack.push(track);
						return pyjs__ret;
					} else { throw pyjs_try_err }
				}
			}
			track.lineno=46;
			track.lineno=46;
			var pyjs__ret = result;
			trackstack.pop();track=trackstack.pop();trackstack.push(track);
			return pyjs__ret;
		};
		LlkApp.sample.__name__ = 'sample';

		LlkApp.sample.parse_kwargs = function ( __kwargs, population, k ) {
			if (typeof population == 'undefined') {
				population=__kwargs.population;
				delete __kwargs.population;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.population != 'undefined') {
				pyjs__exception_func_multiple_values('LlkApp.sample', 'population');
			}
			if (typeof k == 'undefined') {
				k=__kwargs.k;
				delete __kwargs.k;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.k != 'undefined') {
				pyjs__exception_func_multiple_values('LlkApp.sample', 'k');
			}
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('LlkApp.sample', i);
				}
			}
			var __r = [population, k];
			for (var pyjs__va_arg = 3;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		};
		track.lineno=48;
		LlkApp.trace = function(func) {
			if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length);
			track={module:'LlkApp',lineno:48};trackstack.push(track);
			track.module='LlkApp';
			track.lineno=48;
			track.lineno=49;
			new_func = function() {
				if (pyjs_options.arg_count && arguments.length < 0) pyjs__exception_func_param(arguments.callee.__name__, 0, null, arguments.length);
				var kwargs = arguments.length >= 1 ? arguments[arguments.length-1] : arguments[arguments.length];
				var args = pyjslib.Tuple();
				for (var pyjs__va_arg = 0; pyjs__va_arg < arguments.length-1; pyjs__va_arg++) {
					var pyjs__arg = arguments[pyjs__va_arg];
					args.append(pyjs__arg);
				}
				track={module:'LlkApp',lineno:49};trackstack.push(track);
				track.module='LlkApp';
				track.lineno=49;
				track.lineno=50;
				var result = pyjs_kwargs_function_call(func, args, kwargs, [{}]);
				track.lineno=51;
				console.log(func);
				track.lineno=52;
				console.log(args, kwargs);
				track.lineno=53;
				console.log(result);
				track.lineno=54;
				track.lineno=54;
				var pyjs__ret = result;
				trackstack.pop();track=trackstack.pop();trackstack.push(track);
				return pyjs__ret;
			};
			new_func.__name__ = 'new_func';

			new_func.parse_kwargs = function ( __kwargs ) {
				var __r = [];
				for (var pyjs__va_arg = 1;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
					__r.push(arguments[pyjs__va_arg]);
				}

				__r.push(pyjslib.Dict(__kwargs));
				return __r;
			};
			track.lineno=55;
			track.lineno=55;
			var pyjs__ret = new_func;
			trackstack.pop();track=trackstack.pop();trackstack.push(track);
			return pyjs__ret;
		};
		LlkApp.trace.__name__ = 'trace';

		LlkApp.trace.parse_kwargs = function ( __kwargs, func ) {
			if (typeof func == 'undefined') {
				func=__kwargs.func;
				delete __kwargs.func;
			} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.func != 'undefined') {
				pyjs__exception_func_multiple_values('LlkApp.trace', 'func');
			}
			if (pyjs_options.arg_kwarg_unexpected_keyword) {
				for (var i in __kwargs) {
					pyjs__exception_func_unexpected_keyword('LlkApp.trace', i);
				}
			}
			var __r = [func];
			for (var pyjs__va_arg = 2;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
				__r.push(arguments[pyjs__va_arg]);
			}

			return __r;
		};
		track.lineno=57;
		LlkApp.ImgObj = (function(){
			var cls_instance = pyjs__class_instance('ImgObj');
			var cls_definition = new Object();
			cls_definition.__md5__ = '052e0f51dfff41c7c5532144f788aeb1';
			cls_definition.__init__ = pyjs__bind_method(cls_instance, '__init__', function(img, xth, yth) {
				if (this.__is_instance__ === true) {
					var self = this;
					if (pyjs_options.arg_count && arguments.length != 3) pyjs__exception_func_param(arguments.callee.__name__, 4, 4, arguments.length+1);
				} else {
					var self = arguments[0];
					img = arguments[1];
					xth = arguments[2];
					yth = arguments[3];
					if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					if (pyjs_options.arg_count && arguments.length != 4) pyjs__exception_func_param(arguments.callee.__name__, 4, 4, arguments.length);
				}
				if (pyjs_options.arg_instance_type) {
					if (self.prototype.__md5__ !== '052e0f51dfff41c7c5532144f788aeb1') {
						if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
							pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
						}
					}
				}
				track={module:LlkApp, lineno:58};trackstack.push(track);
				track.module='LlkApp';
				track.lineno=58;
				track.lineno=59;
				self.img = img;
				track.lineno=60;
				var __tupleassign__000007 = new pyjslib.Tuple([ ( xth * LlkApp.uwidth ) ,  ( yth * LlkApp.uheight ) ]);
				self.x = __tupleassign__000007.__getitem__(0);
				self.y = __tupleassign__000007.__getitem__(1);
				trackstack.pop();track=trackstack.pop();trackstack.push(track);
				return null;
			}
			, function ( __kwargs, img, xth, yth ) {
				if (typeof img == 'undefined') {
					img=__kwargs.img;
					delete __kwargs.img;
				} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.img != 'undefined') {
					pyjs__exception_func_multiple_values('__init__', 'img');
				}
				if (typeof xth == 'undefined') {
					xth=__kwargs.xth;
					delete __kwargs.xth;
				} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.xth != 'undefined') {
					pyjs__exception_func_multiple_values('__init__', 'xth');
				}
				if (typeof yth == 'undefined') {
					yth=__kwargs.yth;
					delete __kwargs.yth;
				} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.yth != 'undefined') {
					pyjs__exception_func_multiple_values('__init__', 'yth');
				}
				if (pyjs_options.arg_kwarg_unexpected_keyword) {
					for (var i in __kwargs) {
						pyjs__exception_func_unexpected_keyword('__init__', i);
					}
				}
				var __r = [img, xth, yth];
				for (var pyjs__va_arg = 4;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
					__r.push(arguments[pyjs__va_arg]);
				}

				return __r;
			});
			cls_definition.draw = pyjs__bind_method(cls_instance, 'draw', function(ctx, x, y) {
				if (this.__is_instance__ === true) {
					var self = this;
					if (pyjs_options.arg_count && arguments.length != 3) pyjs__exception_func_param(arguments.callee.__name__, 4, 4, arguments.length+1);
				} else {
					var self = arguments[0];
					ctx = arguments[1];
					x = arguments[2];
					y = arguments[3];
					if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					if (pyjs_options.arg_count && arguments.length != 4) pyjs__exception_func_param(arguments.callee.__name__, 4, 4, arguments.length);
				}
				if (pyjs_options.arg_instance_type) {
					if (self.prototype.__md5__ !== '052e0f51dfff41c7c5532144f788aeb1') {
						if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
							pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
						}
					}
				}
				track={module:LlkApp, lineno:61};trackstack.push(track);
				track.module='LlkApp';
				track.lineno=61;
				track.lineno=62;
				ctx.drawImage((self.img===undefined?(function(){throw new TypeError('self.img is undefined')})():(typeof self.img == 'function' && self.__is_instance__?pyjslib.getattr(self, 'img'):self.img)), (self.x===undefined?(function(){throw new TypeError('self.x is undefined')})():(typeof self.x == 'function' && self.__is_instance__?pyjslib.getattr(self, 'x'):self.x)), (self.y===undefined?(function(){throw new TypeError('self.y is undefined')})():(typeof self.y == 'function' && self.__is_instance__?pyjslib.getattr(self, 'y'):self.y)), LlkApp.uwidth, LlkApp.uheight, x, y, LlkApp.uwidth, LlkApp.uheight);
				trackstack.pop();track=trackstack.pop();trackstack.push(track);
				return null;
			}
			, function ( __kwargs, ctx, x, y ) {
				if (typeof ctx == 'undefined') {
					ctx=__kwargs.ctx;
					delete __kwargs.ctx;
				} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.ctx != 'undefined') {
					pyjs__exception_func_multiple_values('draw', 'ctx');
				}
				if (typeof x == 'undefined') {
					x=__kwargs.x;
					delete __kwargs.x;
				} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.x != 'undefined') {
					pyjs__exception_func_multiple_values('draw', 'x');
				}
				if (typeof y == 'undefined') {
					y=__kwargs.y;
					delete __kwargs.y;
				} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.y != 'undefined') {
					pyjs__exception_func_multiple_values('draw', 'y');
				}
				if (pyjs_options.arg_kwarg_unexpected_keyword) {
					for (var i in __kwargs) {
						pyjs__exception_func_unexpected_keyword('draw', i);
					}
				}
				var __r = [ctx, x, y];
				for (var pyjs__va_arg = 4;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
					__r.push(arguments[pyjs__va_arg]);
				}

				return __r;
			});
			return pyjs__class_function(cls_instance, cls_definition, 
			                            new Array(pyjslib.object));
		})();
		track.lineno=65;
		LlkApp.BasicBox = (function(){
			var cls_instance = pyjs__class_instance('BasicBox');
			var cls_definition = new Object();
			cls_definition.__md5__ = 'cdbc295221c8a9f73cad40db67f6a83b';
			cls_definition.__init__ = pyjs__bind_method(cls_instance, '__init__', function(position, imgobj, app) {
				if (this.__is_instance__ === true) {
					var self = this;
					if (pyjs_options.arg_count && arguments.length != 3) pyjs__exception_func_param(arguments.callee.__name__, 4, 4, arguments.length+1);
				} else {
					var self = arguments[0];
					position = arguments[1];
					imgobj = arguments[2];
					app = arguments[3];
					if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					if (pyjs_options.arg_count && arguments.length != 4) pyjs__exception_func_param(arguments.callee.__name__, 4, 4, arguments.length);
				}
				if (pyjs_options.arg_instance_type) {
					if (self.prototype.__md5__ !== 'cdbc295221c8a9f73cad40db67f6a83b') {
						if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
							pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
						}
					}
				}
				track={module:LlkApp, lineno:66};trackstack.push(track);
				track.module='LlkApp';
				track.lineno=66;
				track.lineno=67;
				self.img = imgobj;
				track.lineno=68;
				var __tupleassign__000008 = position;
				self.xth = __tupleassign__000008.__getitem__(0);
				self.yth = __tupleassign__000008.__getitem__(1);
				track.lineno=69;
				var __tupleassign__000009 = new pyjslib.Tuple([ ( (self.xth===undefined?(function(){throw new TypeError('self.xth is undefined')})():(typeof self.xth == 'function' && self.__is_instance__?pyjslib.getattr(self, 'xth'):self.xth)) * LlkApp.uwidth ) ,  ( (self.yth===undefined?(function(){throw new TypeError('self.yth is undefined')})():(typeof self.yth == 'function' && self.__is_instance__?pyjslib.getattr(self, 'yth'):self.yth)) * LlkApp.uheight ) ]);
				self.x = __tupleassign__000009.__getitem__(0);
				self.y = __tupleassign__000009.__getitem__(1);
				track.lineno=70;
				self.app = app;
				track.lineno=71;
				self.ctx = (app.context===undefined?(function(){throw new TypeError('app.context is undefined')})():(typeof app.context == 'function' && app.__is_instance__?pyjslib.getattr(app, 'context'):app.context));
				track.lineno=72;
				self.selected = false;
				track.lineno=73;
				self.alive = true;
				trackstack.pop();track=trackstack.pop();trackstack.push(track);
				return null;
			}
			, function ( __kwargs, position, imgobj, app ) {
				if (typeof position == 'undefined') {
					position=__kwargs.position;
					delete __kwargs.position;
				} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.position != 'undefined') {
					pyjs__exception_func_multiple_values('__init__', 'position');
				}
				if (typeof imgobj == 'undefined') {
					imgobj=__kwargs.imgobj;
					delete __kwargs.imgobj;
				} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.imgobj != 'undefined') {
					pyjs__exception_func_multiple_values('__init__', 'imgobj');
				}
				if (typeof app == 'undefined') {
					app=__kwargs.app;
					delete __kwargs.app;
				} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.app != 'undefined') {
					pyjs__exception_func_multiple_values('__init__', 'app');
				}
				if (pyjs_options.arg_kwarg_unexpected_keyword) {
					for (var i in __kwargs) {
						pyjs__exception_func_unexpected_keyword('__init__', i);
					}
				}
				var __r = [position, imgobj, app];
				for (var pyjs__va_arg = 4;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
					__r.push(arguments[pyjs__va_arg]);
				}

				return __r;
			});
			cls_definition.update = pyjs__bind_method(cls_instance, 'update', function(ticks) {
				if (this.__is_instance__ === true) {
					var self = this;
					if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 2, 2, arguments.length+1);
				} else {
					var self = arguments[0];
					ticks = arguments[1];
					if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					if (pyjs_options.arg_count && arguments.length != 2) pyjs__exception_func_param(arguments.callee.__name__, 2, 2, arguments.length);
				}
				if (pyjs_options.arg_instance_type) {
					if (self.prototype.__md5__ !== 'cdbc295221c8a9f73cad40db67f6a83b') {
						if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
							pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
						}
					}
				}
				track={module:LlkApp, lineno:74};trackstack.push(track);
				track.module='LlkApp';
				track.lineno=74;
				track.lineno=75;
				track.lineno=75;
				var pyjs__ret = false;
				trackstack.pop();track=trackstack.pop();trackstack.push(track);
				return pyjs__ret;
			}
			, function ( __kwargs, ticks ) {
				if (typeof ticks == 'undefined') {
					ticks=__kwargs.ticks;
					delete __kwargs.ticks;
				} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.ticks != 'undefined') {
					pyjs__exception_func_multiple_values('update', 'ticks');
				}
				if (pyjs_options.arg_kwarg_unexpected_keyword) {
					for (var i in __kwargs) {
						pyjs__exception_func_unexpected_keyword('update', i);
					}
				}
				var __r = [ticks];
				for (var pyjs__va_arg = 2;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
					__r.push(arguments[pyjs__va_arg]);
				}

				return __r;
			});
			cls_definition.draw = pyjs__bind_method(cls_instance, 'draw', function() {
				if (this.__is_instance__ === true) {
					var self = this;
					if (pyjs_options.arg_count && arguments.length != 0) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length+1);
				} else {
					var self = arguments[0];
					if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length);
				}
				if (pyjs_options.arg_instance_type) {
					if (self.prototype.__md5__ !== 'cdbc295221c8a9f73cad40db67f6a83b') {
						if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
							pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
						}
					}
				}
				track={module:LlkApp, lineno:77};trackstack.push(track);
				track.module='LlkApp';
				track.lineno=77;
				track.lineno=78;
				if (pyjslib.bool(!((self.alive===undefined?(function(){throw new TypeError('self.alive is undefined')})():(typeof self.alive == 'function' && self.__is_instance__?pyjslib.getattr(self, 'alive'):self.alive))))) {
					track.lineno=79;
					track.lineno=79;
					var pyjs__ret = false;
					trackstack.pop();track=trackstack.pop();trackstack.push(track);
					return pyjs__ret;
				}
				track.lineno=80;
				var ctx = (self.ctx===undefined?(function(){throw new TypeError('self.ctx is undefined')})():(typeof self.ctx == 'function' && self.__is_instance__?pyjslib.getattr(self, 'ctx'):self.ctx));
				track.lineno=81;
				self.img.draw(ctx, (self.x===undefined?(function(){throw new TypeError('self.x is undefined')})():(typeof self.x == 'function' && self.__is_instance__?pyjslib.getattr(self, 'x'):self.x)), (self.y===undefined?(function(){throw new TypeError('self.y is undefined')})():(typeof self.y == 'function' && self.__is_instance__?pyjslib.getattr(self, 'y'):self.y)));
				track.lineno=82;
				if (pyjslib.bool((self.selected===undefined?(function(){throw new TypeError('self.selected is undefined')})():(typeof self.selected == 'function' && self.__is_instance__?pyjslib.getattr(self, 'selected'):self.selected)))) {
					track.lineno=84;
					ctx.strokeRect( ( (self.x===undefined?(function(){throw new TypeError('self.x is undefined')})():(typeof self.x == 'function' && self.__is_instance__?pyjslib.getattr(self, 'x'):self.x)) + 1 ) ,  ( (self.y===undefined?(function(){throw new TypeError('self.y is undefined')})():(typeof self.y == 'function' && self.__is_instance__?pyjslib.getattr(self, 'y'):self.y)) + 1 ) ,  ( LlkApp.uwidth - 2 ) ,  ( LlkApp.uheight - 2 ) );
				}
				trackstack.pop();track=trackstack.pop();trackstack.push(track);
				return null;
			}
			, function ( __kwargs ) {
				if (pyjs_options.arg_kwarg_unexpected_keyword) {
					for (var i in __kwargs) {
						pyjs__exception_func_unexpected_keyword('draw', i);
					}
				}
				var __r = [];
				for (var pyjs__va_arg = 1;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
					__r.push(arguments[pyjs__va_arg]);
				}

				return __r;
			});
			cls_definition.toggleSelect = pyjs__bind_method(cls_instance, 'toggleSelect', function() {
				if (this.__is_instance__ === true) {
					var self = this;
					if (pyjs_options.arg_count && arguments.length != 0) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length+1);
				} else {
					var self = arguments[0];
					if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length);
				}
				if (pyjs_options.arg_instance_type) {
					if (self.prototype.__md5__ !== 'cdbc295221c8a9f73cad40db67f6a83b') {
						if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
							pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
						}
					}
				}
				track={module:LlkApp, lineno:85};trackstack.push(track);
				track.module='LlkApp';
				track.lineno=85;
				track.lineno=86;
				self.selected = !((self.selected===undefined?(function(){throw new TypeError('self.selected is undefined')})():(typeof self.selected == 'function' && self.__is_instance__?pyjslib.getattr(self, 'selected'):self.selected)));
				track.lineno=87;
				self.draw();
				trackstack.pop();track=trackstack.pop();trackstack.push(track);
				return null;
			}
			, function ( __kwargs ) {
				if (pyjs_options.arg_kwarg_unexpected_keyword) {
					for (var i in __kwargs) {
						pyjs__exception_func_unexpected_keyword('toggleSelect', i);
					}
				}
				var __r = [];
				for (var pyjs__va_arg = 1;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
					__r.push(arguments[pyjs__va_arg]);
				}

				return __r;
			});
			cls_definition.doSelect = pyjs__bind_method(cls_instance, 'doSelect', function() {
				if (this.__is_instance__ === true) {
					var self = this;
					if (pyjs_options.arg_count && arguments.length != 0) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length+1);
				} else {
					var self = arguments[0];
					if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length);
				}
				if (pyjs_options.arg_instance_type) {
					if (self.prototype.__md5__ !== 'cdbc295221c8a9f73cad40db67f6a83b') {
						if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
							pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
						}
					}
				}
				track={module:LlkApp, lineno:88};trackstack.push(track);
				track.module='LlkApp';
				track.lineno=88;
				track.lineno=89;
				self.selected = true;
				track.lineno=90;
				self.draw();
				trackstack.pop();track=trackstack.pop();trackstack.push(track);
				return null;
			}
			, function ( __kwargs ) {
				if (pyjs_options.arg_kwarg_unexpected_keyword) {
					for (var i in __kwargs) {
						pyjs__exception_func_unexpected_keyword('doSelect', i);
					}
				}
				var __r = [];
				for (var pyjs__va_arg = 1;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
					__r.push(arguments[pyjs__va_arg]);
				}

				return __r;
			});
			cls_definition.unSelect = pyjs__bind_method(cls_instance, 'unSelect', function() {
				if (this.__is_instance__ === true) {
					var self = this;
					if (pyjs_options.arg_count && arguments.length != 0) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length+1);
				} else {
					var self = arguments[0];
					if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length);
				}
				if (pyjs_options.arg_instance_type) {
					if (self.prototype.__md5__ !== 'cdbc295221c8a9f73cad40db67f6a83b') {
						if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
							pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
						}
					}
				}
				track={module:LlkApp, lineno:91};trackstack.push(track);
				track.module='LlkApp';
				track.lineno=91;
				track.lineno=92;
				self.selected = false;
				track.lineno=93;
				self.draw();
				trackstack.pop();track=trackstack.pop();trackstack.push(track);
				return null;
			}
			, function ( __kwargs ) {
				if (pyjs_options.arg_kwarg_unexpected_keyword) {
					for (var i in __kwargs) {
						pyjs__exception_func_unexpected_keyword('unSelect', i);
					}
				}
				var __r = [];
				for (var pyjs__va_arg = 1;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
					__r.push(arguments[pyjs__va_arg]);
				}

				return __r;
			});
			cls_definition.clear = pyjs__bind_method(cls_instance, 'clear', function() {
				if (this.__is_instance__ === true) {
					var self = this;
					if (pyjs_options.arg_count && arguments.length != 0) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length+1);
				} else {
					var self = arguments[0];
					if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length);
				}
				if (pyjs_options.arg_instance_type) {
					if (self.prototype.__md5__ !== 'cdbc295221c8a9f73cad40db67f6a83b') {
						if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
							pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
						}
					}
				}
				track={module:LlkApp, lineno:94};trackstack.push(track);
				track.module='LlkApp';
				track.lineno=94;
				track.lineno=95;
				self.ctx.clearRect((self.x===undefined?(function(){throw new TypeError('self.x is undefined')})():(typeof self.x == 'function' && self.__is_instance__?pyjslib.getattr(self, 'x'):self.x)), (self.y===undefined?(function(){throw new TypeError('self.y is undefined')})():(typeof self.y == 'function' && self.__is_instance__?pyjslib.getattr(self, 'y'):self.y)), LlkApp.uwidth, LlkApp.uheight);
				trackstack.pop();track=trackstack.pop();trackstack.push(track);
				return null;
			}
			, function ( __kwargs ) {
				if (pyjs_options.arg_kwarg_unexpected_keyword) {
					for (var i in __kwargs) {
						pyjs__exception_func_unexpected_keyword('clear', i);
					}
				}
				var __r = [];
				for (var pyjs__va_arg = 1;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
					__r.push(arguments[pyjs__va_arg]);
				}

				return __r;
			});
			cls_definition.dead = pyjs__bind_method(cls_instance, 'dead', function() {
				if (this.__is_instance__ === true) {
					var self = this;
					if (pyjs_options.arg_count && arguments.length != 0) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length+1);
				} else {
					var self = arguments[0];
					if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 1, 1, arguments.length);
				}
				if (pyjs_options.arg_instance_type) {
					if (self.prototype.__md5__ !== 'cdbc295221c8a9f73cad40db67f6a83b') {
						if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
							pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
						}
					}
				}
				track={module:LlkApp, lineno:97};trackstack.push(track);
				track.module='LlkApp';
				track.lineno=97;
				track.lineno=98;
				self.clear();
				track.lineno=99;
				self.alive = false;
				trackstack.pop();track=trackstack.pop();trackstack.push(track);
				return null;
			}
			, function ( __kwargs ) {
				if (pyjs_options.arg_kwarg_unexpected_keyword) {
					for (var i in __kwargs) {
						pyjs__exception_func_unexpected_keyword('dead', i);
					}
				}
				var __r = [];
				for (var pyjs__va_arg = 1;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
					__r.push(arguments[pyjs__va_arg]);
				}

				return __r;
			});
			return pyjs__class_function(cls_instance, cls_definition, 
			                            new Array(pyjslib.object));
		})();
		track.lineno=100;
		LlkApp.LlkCanvas = (function(){
			var cls_instance = pyjs__class_instance('LlkCanvas');
			var cls_definition = new Object();
			cls_definition.__md5__ = '61f2aaebaf48f70e617afa060a9118d1';
			cls_definition.__init__ = pyjs__bind_method(cls_instance, '__init__', function(width, height) {
				if (this.__is_instance__ === true) {
					var self = this;
					if (pyjs_options.arg_count && arguments.length != 2) pyjs__exception_func_param(arguments.callee.__name__, 3, 3, arguments.length+1);
				} else {
					var self = arguments[0];
					width = arguments[1];
					height = arguments[2];
					if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					if (pyjs_options.arg_count && arguments.length != 3) pyjs__exception_func_param(arguments.callee.__name__, 3, 3, arguments.length);
				}
				if (pyjs_options.arg_instance_type) {
					if (self.prototype.__md5__ !== '61f2aaebaf48f70e617afa060a9118d1') {
						if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
							pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
						}
					}
				}
				track={module:LlkApp, lineno:101};trackstack.push(track);
				track.module='LlkApp';
				track.lineno=101;
				track.lineno=102;
				pyjslib._super(LlkApp.LlkCanvas, self).__init__(width, height);
				track.lineno=103;
				var __tupleassign__000010 = new pyjslib.Tuple([width, height]);
				self.width = __tupleassign__000010.__getitem__(0);
				self.height = __tupleassign__000010.__getitem__(1);
				track.lineno=104;
				self.img = LlkApp.CanvasImage(String('output.png'), self);
				track.lineno=105;
				self.objects = new pyjslib.List([]);
				track.lineno=106;
				self.addClickListener((self.onClick===undefined?(function(){throw new TypeError('self.onClick is undefined')})():(typeof self.onClick == 'function' && self.__is_instance__?pyjslib.getattr(self, 'onClick'):self.onClick)));
				track.lineno=107;
				self.addKeyboardListener(self);
				track.lineno=108;
				self.selected_box = null;
				trackstack.pop();track=trackstack.pop();trackstack.push(track);
				return null;
			}
			, function ( __kwargs, width, height ) {
				if (typeof width == 'undefined') {
					width=__kwargs.width;
					delete __kwargs.width;
				} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.width != 'undefined') {
					pyjs__exception_func_multiple_values('__init__', 'width');
				}
				if (typeof height == 'undefined') {
					height=__kwargs.height;
					delete __kwargs.height;
				} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.height != 'undefined') {
					pyjs__exception_func_multiple_values('__init__', 'height');
				}
				if (pyjs_options.arg_kwarg_unexpected_keyword) {
					for (var i in __kwargs) {
						pyjs__exception_func_unexpected_keyword('__init__', i);
					}
				}
				var __r = [width, height];
				for (var pyjs__va_arg = 3;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
					__r.push(arguments[pyjs__va_arg]);
				}

				return __r;
			});
			cls_definition.init_map = pyjs__bind_method(cls_instance, 'init_map', function(width, height) {
				if (this.__is_instance__ === true) {
					var self = this;
					if (pyjs_options.arg_count && arguments.length != 2) pyjs__exception_func_param(arguments.callee.__name__, 3, 3, arguments.length+1);
				} else {
					var self = arguments[0];
					width = arguments[1];
					height = arguments[2];
					if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					if (pyjs_options.arg_count && arguments.length != 3) pyjs__exception_func_param(arguments.callee.__name__, 3, 3, arguments.length);
				}
				if (pyjs_options.arg_instance_type) {
					if (self.prototype.__md5__ !== '61f2aaebaf48f70e617afa060a9118d1') {
						if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
							pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
						}
					}
				}
				track={module:LlkApp, lineno:109};trackstack.push(track);
				track.module='LlkApp';
				track.lineno=109;
				track.lineno=110;
				var __tupleassign__000011 = new pyjslib.Tuple([width, height]);
				self.map_width = __tupleassign__000011.__getitem__(0);
				self.map_height = __tupleassign__000011.__getitem__(1);
				track.lineno=111;
				self.map = new pyjslib.List([]);
				track.lineno=112;
				var pyjs__trackstack_size_1=trackstack.length;
				var __x = pyjslib.range((self.map_height===undefined?(function(){throw new TypeError('self.map_height is undefined')})():(typeof self.map_height == 'function' && self.__is_instance__?pyjslib.getattr(self, 'map_height'):self.map_height))).__iter__();
				try {
					while (true) {
						var x = __x.next();
						
						track.lineno=113;
						var line = new pyjslib.List([]);
						track.lineno=114;
						var pyjs__trackstack_size_2=trackstack.length;
						var __y = pyjslib.range((self.map_width===undefined?(function(){throw new TypeError('self.map_width is undefined')})():(typeof self.map_width == 'function' && self.__is_instance__?pyjslib.getattr(self, 'map_width'):self.map_width))).__iter__();
						try {
							while (true) {
								var y = __y.next();
								
								track.lineno=115;
								line.append(0);
							}
						} catch (e) {
							if (e.__name__ != 'StopIteration') {
								throw e;
							}
						}
						if (trackstack.length > pyjs__trackstack_size_2) {
							trackstack = trackstack.slice(0,pyjs__trackstack_size_2);
							track = trackstack.slice(-1)[0];
						}
						track.module='LlkApp';
						track.lineno=116;
						self.map.append(line);
					}
				} catch (e) {
					if (e.__name__ != 'StopIteration') {
						throw e;
					}
				}
				if (trackstack.length > pyjs__trackstack_size_1) {
					trackstack = trackstack.slice(0,pyjs__trackstack_size_1);
					track = trackstack.slice(-1)[0];
				}
				track.module='LlkApp';
				trackstack.pop();track=trackstack.pop();trackstack.push(track);
				return null;
			}
			, function ( __kwargs, width, height ) {
				if (typeof width == 'undefined') {
					width=__kwargs.width;
					delete __kwargs.width;
				} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.width != 'undefined') {
					pyjs__exception_func_multiple_values('init_map', 'width');
				}
				if (typeof height == 'undefined') {
					height=__kwargs.height;
					delete __kwargs.height;
				} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.height != 'undefined') {
					pyjs__exception_func_multiple_values('init_map', 'height');
				}
				if (pyjs_options.arg_kwarg_unexpected_keyword) {
					for (var i in __kwargs) {
						pyjs__exception_func_unexpected_keyword('init_map', i);
					}
				}
				var __r = [width, height];
				for (var pyjs__va_arg = 3;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
					__r.push(arguments[pyjs__va_arg]);
				}

				return __r;
			});
			cls_definition.onTick = pyjs__bind_method(cls_instance, 'onTick', function(tick, force_draw) {
				if (this.__is_instance__ === true) {
					var self = this;
					if (pyjs_options.arg_count && (arguments.length < 1 || arguments.length > 2)) pyjs__exception_func_param(arguments.callee.__name__, 2, 3, arguments.length+1);
				} else {
					var self = arguments[0];
					tick = arguments[1];
					force_draw = arguments[2];
					if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					if (pyjs_options.arg_count && (arguments.length < 2 || arguments.length > 3)) pyjs__exception_func_param(arguments.callee.__name__, 2, 3, arguments.length);
				}
				if (pyjs_options.arg_instance_type) {
					if (self.prototype.__md5__ !== '61f2aaebaf48f70e617afa060a9118d1') {
						if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
							pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
						}
					}
				}
				if (typeof force_draw == 'undefined') force_draw=false;
				track={module:LlkApp, lineno:117};trackstack.push(track);
				track.module='LlkApp';
				track.lineno=117;
				track.lineno=118;
				var updated = false;
				track.lineno=119;
				var pyjs__trackstack_size_1=trackstack.length;
				var __obj = self.objects.__iter__();
				try {
					while (true) {
						var obj = __obj.next();
						
						track.lineno=120;
						if (pyjslib.bool(((obj.alive===undefined?(function(){throw new TypeError('obj.alive is undefined')})():(typeof obj.alive == 'function' && obj.__is_instance__?pyjslib.getattr(obj, 'alive'):obj.alive))) && (obj.update(tick)))) {
							track.lineno=121;
							updated = true;
						}
					}
				} catch (e) {
					if (e.__name__ != 'StopIteration') {
						throw e;
					}
				}
				if (trackstack.length > pyjs__trackstack_size_1) {
					trackstack = trackstack.slice(0,pyjs__trackstack_size_1);
					track = trackstack.slice(-1)[0];
				}
				track.module='LlkApp';
				track.lineno=122;
				if (pyjslib.bool((updated) || (force_draw))) {
					track.lineno=123;
					var ctx = (self.context===undefined?(function(){throw new TypeError('self.context is undefined')})():(typeof self.context == 'function' && self.__is_instance__?pyjslib.getattr(self, 'context'):self.context));
					track.lineno=124;
					ctx.lineWidth = 2;
					track.lineno=125;
					ctx.clearRect(0, 0, (self.width===undefined?(function(){throw new TypeError('self.width is undefined')})():(typeof self.width == 'function' && self.__is_instance__?pyjslib.getattr(self, 'width'):self.width)), (self.height===undefined?(function(){throw new TypeError('self.height is undefined')})():(typeof self.height == 'function' && self.__is_instance__?pyjslib.getattr(self, 'height'):self.height)));
					track.lineno=126;
					var pyjs__trackstack_size_1=trackstack.length;
					var __obj = self.objects.__iter__();
					try {
						while (true) {
							var obj = __obj.next();
							
							track.lineno=127;
							if (pyjslib.bool((obj.alive===undefined?(function(){throw new TypeError('obj.alive is undefined')})():(typeof obj.alive == 'function' && obj.__is_instance__?pyjslib.getattr(obj, 'alive'):obj.alive)))) {
								track.lineno=128;
								obj.draw();
							}
						}
					} catch (e) {
						if (e.__name__ != 'StopIteration') {
							throw e;
						}
					}
					if (trackstack.length > pyjs__trackstack_size_1) {
						trackstack = trackstack.slice(0,pyjs__trackstack_size_1);
						track = trackstack.slice(-1)[0];
					}
					track.module='LlkApp';
				}
				trackstack.pop();track=trackstack.pop();trackstack.push(track);
				return null;
			}
			, function ( __kwargs, tick, force_draw ) {
				if (typeof tick == 'undefined') {
					tick=__kwargs.tick;
					delete __kwargs.tick;
				} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.tick != 'undefined') {
					pyjs__exception_func_multiple_values('onTick', 'tick');
				}
				if (typeof force_draw == 'undefined') {
					force_draw=__kwargs.force_draw;
					delete __kwargs.force_draw;
				} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.force_draw != 'undefined') {
					pyjs__exception_func_multiple_values('onTick', 'force_draw');
				}
				if (pyjs_options.arg_kwarg_unexpected_keyword) {
					for (var i in __kwargs) {
						pyjs__exception_func_unexpected_keyword('onTick', i);
					}
				}
				var __r = [tick, force_draw];
				for (var pyjs__va_arg = 3;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
					__r.push(arguments[pyjs__va_arg]);
				}

				return __r;
			});
			cls_definition.onTimer = pyjs__bind_method(cls_instance, 'onTimer', function(t) {
				if (this.__is_instance__ === true) {
					var self = this;
					if (pyjs_options.arg_count && (arguments.length < 0 || arguments.length > 1)) pyjs__exception_func_param(arguments.callee.__name__, 1, 2, arguments.length+1);
				} else {
					var self = arguments[0];
					t = arguments[1];
					if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					if (pyjs_options.arg_count && (arguments.length < 1 || arguments.length > 2)) pyjs__exception_func_param(arguments.callee.__name__, 1, 2, arguments.length);
				}
				if (pyjs_options.arg_instance_type) {
					if (self.prototype.__md5__ !== '61f2aaebaf48f70e617afa060a9118d1') {
						if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
							pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
						}
					}
				}
				if (typeof t == 'undefined') t=null;
				track={module:LlkApp, lineno:129};trackstack.push(track);
				track.module='LlkApp';
				track.lineno=129;
				track.lineno=130;
				self.ticks += 1;
				track.lineno=131;
				self.onTick(1);
				trackstack.pop();track=trackstack.pop();trackstack.push(track);
				return null;
			}
			, function ( __kwargs, t ) {
				if (typeof t == 'undefined') {
					t=__kwargs.t;
					delete __kwargs.t;
				} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.t != 'undefined') {
					pyjs__exception_func_multiple_values('onTimer', 't');
				}
				if (pyjs_options.arg_kwarg_unexpected_keyword) {
					for (var i in __kwargs) {
						pyjs__exception_func_unexpected_keyword('onTimer', i);
					}
				}
				var __r = [t];
				for (var pyjs__va_arg = 2;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
					__r.push(arguments[pyjs__va_arg]);
				}

				return __r;
			});
			cls_definition.add = pyjs__bind_method(cls_instance, 'add', function(obj) {
				if (this.__is_instance__ === true) {
					var self = this;
					if (pyjs_options.arg_count && arguments.length != 1) pyjs__exception_func_param(arguments.callee.__name__, 2, 2, arguments.length+1);
				} else {
					var self = arguments[0];
					obj = arguments[1];
					if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					if (pyjs_options.arg_count && arguments.length != 2) pyjs__exception_func_param(arguments.callee.__name__, 2, 2, arguments.length);
				}
				if (pyjs_options.arg_instance_type) {
					if (self.prototype.__md5__ !== '61f2aaebaf48f70e617afa060a9118d1') {
						if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
							pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
						}
					}
				}
				track={module:LlkApp, lineno:132};trackstack.push(track);
				track.module='LlkApp';
				track.lineno=132;
				track.lineno=133;
				self.objects.append(obj);
				trackstack.pop();track=trackstack.pop();trackstack.push(track);
				return null;
			}
			, function ( __kwargs, obj ) {
				if (typeof obj == 'undefined') {
					obj=__kwargs.obj;
					delete __kwargs.obj;
				} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.obj != 'undefined') {
					pyjs__exception_func_multiple_values('add', 'obj');
				}
				if (pyjs_options.arg_kwarg_unexpected_keyword) {
					for (var i in __kwargs) {
						pyjs__exception_func_unexpected_keyword('add', i);
					}
				}
				var __r = [obj];
				for (var pyjs__va_arg = 2;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
					__r.push(arguments[pyjs__va_arg]);
				}

				return __r;
			});
			cls_definition.setBox = pyjs__bind_method(cls_instance, 'setBox', function(xth, yth, imgobj) {
				if (this.__is_instance__ === true) {
					var self = this;
					if (pyjs_options.arg_count && arguments.length != 3) pyjs__exception_func_param(arguments.callee.__name__, 4, 4, arguments.length+1);
				} else {
					var self = arguments[0];
					xth = arguments[1];
					yth = arguments[2];
					imgobj = arguments[3];
					if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					if (pyjs_options.arg_count && arguments.length != 4) pyjs__exception_func_param(arguments.callee.__name__, 4, 4, arguments.length);
				}
				if (pyjs_options.arg_instance_type) {
					if (self.prototype.__md5__ !== '61f2aaebaf48f70e617afa060a9118d1') {
						if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
							pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
						}
					}
				}
				track={module:LlkApp, lineno:135};trackstack.push(track);
				track.module='LlkApp';
				track.lineno=135;
				track.lineno=136;
				var box = LlkApp.BasicBox(new pyjslib.Tuple([xth, yth]), imgobj, self);
				track.lineno=137;
				(self.map===undefined?(function(){throw new TypeError('self.map is undefined')})():(typeof self.map == 'function' && self.__is_instance__?pyjslib.getattr(self, 'map'):self.map)).__getitem__(yth).__setitem__(xth, box);
				track.lineno=138;
				self.add(box);
				trackstack.pop();track=trackstack.pop();trackstack.push(track);
				return null;
			}
			, function ( __kwargs, xth, yth, imgobj ) {
				if (typeof xth == 'undefined') {
					xth=__kwargs.xth;
					delete __kwargs.xth;
				} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.xth != 'undefined') {
					pyjs__exception_func_multiple_values('setBox', 'xth');
				}
				if (typeof yth == 'undefined') {
					yth=__kwargs.yth;
					delete __kwargs.yth;
				} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.yth != 'undefined') {
					pyjs__exception_func_multiple_values('setBox', 'yth');
				}
				if (typeof imgobj == 'undefined') {
					imgobj=__kwargs.imgobj;
					delete __kwargs.imgobj;
				} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.imgobj != 'undefined') {
					pyjs__exception_func_multiple_values('setBox', 'imgobj');
				}
				if (pyjs_options.arg_kwarg_unexpected_keyword) {
					for (var i in __kwargs) {
						pyjs__exception_func_unexpected_keyword('setBox', i);
					}
				}
				var __r = [xth, yth, imgobj];
				for (var pyjs__va_arg = 4;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
					__r.push(arguments[pyjs__va_arg]);
				}

				return __r;
			});
			cls_definition.onClick = pyjs__bind_method(cls_instance, 'onClick', function(sender, evt) {
				if (this.__is_instance__ === true) {
					var self = this;
					if (pyjs_options.arg_count && arguments.length != 2) pyjs__exception_func_param(arguments.callee.__name__, 3, 3, arguments.length+1);
				} else {
					var self = arguments[0];
					sender = arguments[1];
					evt = arguments[2];
					if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					if (pyjs_options.arg_count && arguments.length != 3) pyjs__exception_func_param(arguments.callee.__name__, 3, 3, arguments.length);
				}
				if (pyjs_options.arg_instance_type) {
					if (self.prototype.__md5__ !== '61f2aaebaf48f70e617afa060a9118d1') {
						if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
							pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
						}
					}
				}
				track={module:LlkApp, lineno:139};trackstack.push(track);
				track.module='LlkApp';
				track.lineno=139;
				track.lineno=140;
				var x =  ( LlkApp.DOM.eventGetClientX(evt) - LlkApp.DOM.getAbsoluteLeft(self.getElement()) ) ;
				track.lineno=141;
				var y =  ( LlkApp.DOM.eventGetClientY(evt) - LlkApp.DOM.getAbsoluteTop(self.getElement()) ) ;
				track.lineno=142;
				var xth = pyjslib.int( ( x / LlkApp.uwidth ) );
				track.lineno=143;
				var yth = pyjslib.int( ( y / LlkApp.uheight ) );
				track.lineno=144;
				var box = (self.map===undefined?(function(){throw new TypeError('self.map is undefined')})():(typeof self.map == 'function' && self.__is_instance__?pyjslib.getattr(self, 'map'):self.map)).__getitem__(yth).__getitem__(xth);
				track.lineno=145;
				if (pyjslib.bool(!(box))) {
					track.lineno=146;
					track.lineno=146;
					var pyjs__ret = null;
					trackstack.pop();track=trackstack.pop();trackstack.push(track);
					return pyjs__ret;
				}
				track.lineno=147;
				box.toggleSelect();
				track.lineno=148;
				if (pyjslib.bool(!((box.selected===undefined?(function(){throw new TypeError('box.selected is undefined')})():(typeof box.selected == 'function' && box.__is_instance__?pyjslib.getattr(box, 'selected'):box.selected))))) {
					track.lineno=149;
					self.selected_box = null;
				}
				else if (pyjslib.bool(pyjslib.eq((self.selected_box===undefined?(function(){throw new TypeError('self.selected_box is undefined')})():(typeof self.selected_box == 'function' && self.__is_instance__?pyjslib.getattr(self, 'selected_box'):self.selected_box)), null))) {
					track.lineno=151;
					self.selected_box = box;
				}
				else if (pyjslib.bool(((box.img===undefined?(function(){throw new TypeError('box.img is undefined')})():(typeof box.img == 'function' && box.__is_instance__?pyjslib.getattr(box, 'img'):box.img)) != (self.selected_box.img===undefined?(function(){throw new TypeError('self.selected_box.img is undefined')})():(typeof self.selected_box.img == 'function' && self.selected_box.__is_instance__?pyjslib.getattr(self.selected_box, 'img'):self.selected_box.img))))) {
					track.lineno=154;
					self.selected_box.unSelect();
					track.lineno=155;
					self.selected_box = box;
				}
				else {
					track.lineno=157;
					var sbox = (self.selected_box===undefined?(function(){throw new TypeError('self.selected_box is undefined')})():(typeof self.selected_box == 'function' && self.__is_instance__?pyjslib.getattr(self, 'selected_box'):self.selected_box));
					track.lineno=158;
					pyjslib.printFunc([String('check')], 1);
					track.lineno=159;
					var result = false;
					track.lineno=160;
					if (pyjslib.bool((pyjslib.cmp((box.xth===undefined?(function(){throw new TypeError('box.xth is undefined')})():(typeof box.xth == 'function' && box.__is_instance__?pyjslib.getattr(box, 'xth'):box.xth)), (sbox.xth===undefined?(function(){throw new TypeError('sbox.xth is undefined')})():(typeof sbox.xth == 'function' && sbox.__is_instance__?pyjslib.getattr(sbox, 'xth'):sbox.xth))) == -1))) {
						track.lineno=161;
						pyjslib.printFunc([new pyjslib.Tuple([(box.yth===undefined?(function(){throw new TypeError('box.yth is undefined')})():(typeof box.yth == 'function' && box.__is_instance__?pyjslib.getattr(box, 'yth'):box.yth)), (box.xth===undefined?(function(){throw new TypeError('box.xth is undefined')})():(typeof box.xth == 'function' && box.__is_instance__?pyjslib.getattr(box, 'xth'):box.xth))]), new pyjslib.Tuple([(sbox.yth===undefined?(function(){throw new TypeError('sbox.yth is undefined')})():(typeof sbox.yth == 'function' && sbox.__is_instance__?pyjslib.getattr(sbox, 'yth'):sbox.yth)), (sbox.xth===undefined?(function(){throw new TypeError('sbox.xth is undefined')})():(typeof sbox.xth == 'function' && sbox.__is_instance__?pyjslib.getattr(sbox, 'xth'):sbox.xth))])], 1);
						track.lineno=162;
						result = LlkApp.checkllk((self.map===undefined?(function(){throw new TypeError('self.map is undefined')})():(typeof self.map == 'function' && self.__is_instance__?pyjslib.getattr(self, 'map'):self.map)), new pyjslib.Tuple([(box.yth===undefined?(function(){throw new TypeError('box.yth is undefined')})():(typeof box.yth == 'function' && box.__is_instance__?pyjslib.getattr(box, 'yth'):box.yth)), (box.xth===undefined?(function(){throw new TypeError('box.xth is undefined')})():(typeof box.xth == 'function' && box.__is_instance__?pyjslib.getattr(box, 'xth'):box.xth))]), new pyjslib.Tuple([(sbox.yth===undefined?(function(){throw new TypeError('sbox.yth is undefined')})():(typeof sbox.yth == 'function' && sbox.__is_instance__?pyjslib.getattr(sbox, 'yth'):sbox.yth)), (sbox.xth===undefined?(function(){throw new TypeError('sbox.xth is undefined')})():(typeof sbox.xth == 'function' && sbox.__is_instance__?pyjslib.getattr(sbox, 'xth'):sbox.xth))]));
					}
					else {
						track.lineno=164;
						pyjslib.printFunc([new pyjslib.Tuple([(sbox.yth===undefined?(function(){throw new TypeError('sbox.yth is undefined')})():(typeof sbox.yth == 'function' && sbox.__is_instance__?pyjslib.getattr(sbox, 'yth'):sbox.yth)), (sbox.xth===undefined?(function(){throw new TypeError('sbox.xth is undefined')})():(typeof sbox.xth == 'function' && sbox.__is_instance__?pyjslib.getattr(sbox, 'xth'):sbox.xth))]), new pyjslib.Tuple([(box.yth===undefined?(function(){throw new TypeError('box.yth is undefined')})():(typeof box.yth == 'function' && box.__is_instance__?pyjslib.getattr(box, 'yth'):box.yth)), (box.xth===undefined?(function(){throw new TypeError('box.xth is undefined')})():(typeof box.xth == 'function' && box.__is_instance__?pyjslib.getattr(box, 'xth'):box.xth))])], 1);
						track.lineno=165;
						result = LlkApp.checkllk((self.map===undefined?(function(){throw new TypeError('self.map is undefined')})():(typeof self.map == 'function' && self.__is_instance__?pyjslib.getattr(self, 'map'):self.map)), new pyjslib.Tuple([(sbox.yth===undefined?(function(){throw new TypeError('sbox.yth is undefined')})():(typeof sbox.yth == 'function' && sbox.__is_instance__?pyjslib.getattr(sbox, 'yth'):sbox.yth)), (sbox.xth===undefined?(function(){throw new TypeError('sbox.xth is undefined')})():(typeof sbox.xth == 'function' && sbox.__is_instance__?pyjslib.getattr(sbox, 'xth'):sbox.xth))]), new pyjslib.Tuple([(box.yth===undefined?(function(){throw new TypeError('box.yth is undefined')})():(typeof box.yth == 'function' && box.__is_instance__?pyjslib.getattr(box, 'yth'):box.yth)), (box.xth===undefined?(function(){throw new TypeError('box.xth is undefined')})():(typeof box.xth == 'function' && box.__is_instance__?pyjslib.getattr(box, 'xth'):box.xth))]));
					}
					track.lineno=166;
					if (pyjslib.bool(result)) {
						track.lineno=167;
						pyjslib.printFunc([String('path:'), result], 1);
						track.lineno=168;
						sbox.dead();
						track.lineno=169;
						(self.map===undefined?(function(){throw new TypeError('self.map is undefined')})():(typeof self.map == 'function' && self.__is_instance__?pyjslib.getattr(self, 'map'):self.map)).__getitem__((sbox.yth===undefined?(function(){throw new TypeError('sbox.yth is undefined')})():(typeof sbox.yth == 'function' && sbox.__is_instance__?pyjslib.getattr(sbox, 'yth'):sbox.yth))).__setitem__((sbox.xth===undefined?(function(){throw new TypeError('sbox.xth is undefined')})():(typeof sbox.xth == 'function' && sbox.__is_instance__?pyjslib.getattr(sbox, 'xth'):sbox.xth)), 0);
						track.lineno=170;
						box.dead();
						track.lineno=171;
						(self.map===undefined?(function(){throw new TypeError('self.map is undefined')})():(typeof self.map == 'function' && self.__is_instance__?pyjslib.getattr(self, 'map'):self.map)).__getitem__((box.yth===undefined?(function(){throw new TypeError('box.yth is undefined')})():(typeof box.yth == 'function' && box.__is_instance__?pyjslib.getattr(box, 'yth'):box.yth))).__setitem__((box.xth===undefined?(function(){throw new TypeError('box.xth is undefined')})():(typeof box.xth == 'function' && box.__is_instance__?pyjslib.getattr(box, 'xth'):box.xth)), 0);
						track.lineno=172;
						self.selected_box = null;
					}
					else {
						track.lineno=174;
						pyjslib.printFunc([String('fail')], 1);
						track.lineno=175;
						self.selected_box.unSelect();
						track.lineno=176;
						self.selected_box = box;
					}
				}
				trackstack.pop();track=trackstack.pop();trackstack.push(track);
				return null;
			}
			, function ( __kwargs, sender, evt ) {
				if (typeof sender == 'undefined') {
					sender=__kwargs.sender;
					delete __kwargs.sender;
				} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.sender != 'undefined') {
					pyjs__exception_func_multiple_values('onClick', 'sender');
				}
				if (typeof evt == 'undefined') {
					evt=__kwargs.evt;
					delete __kwargs.evt;
				} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.evt != 'undefined') {
					pyjs__exception_func_multiple_values('onClick', 'evt');
				}
				if (pyjs_options.arg_kwarg_unexpected_keyword) {
					for (var i in __kwargs) {
						pyjs__exception_func_unexpected_keyword('onClick', i);
					}
				}
				var __r = [sender, evt];
				for (var pyjs__va_arg = 3;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
					__r.push(arguments[pyjs__va_arg]);
				}

				return __r;
			});
			cls_definition.onKeyPress = pyjs__bind_method(cls_instance, 'onKeyPress', function(sender, code, modifiers) {
				if (this.__is_instance__ === true) {
					var self = this;
					if (pyjs_options.arg_count && arguments.length != 3) pyjs__exception_func_param(arguments.callee.__name__, 4, 4, arguments.length+1);
				} else {
					var self = arguments[0];
					sender = arguments[1];
					code = arguments[2];
					modifiers = arguments[3];
					if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					if (pyjs_options.arg_count && arguments.length != 4) pyjs__exception_func_param(arguments.callee.__name__, 4, 4, arguments.length);
				}
				if (pyjs_options.arg_instance_type) {
					if (self.prototype.__md5__ !== '61f2aaebaf48f70e617afa060a9118d1') {
						if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
							pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
						}
					}
				}
				track={module:LlkApp, lineno:177};trackstack.push(track);
				track.module='LlkApp';
				track.lineno=177;
				track.lineno=178;
				pyjslib.printFunc([code], 1);
				track.lineno=179;
				if (pyjslib.bool((pyjslib.eq(code, String('c').charCodeAt())) && (((self.selected_box===undefined?(function(){throw new TypeError('self.selected_box is undefined')})():(typeof self.selected_box == 'function' && self.__is_instance__?pyjslib.getattr(self, 'selected_box'):self.selected_box)) != null)))) {
					track.lineno=180;
					var sbox = (self.selected_box===undefined?(function(){throw new TypeError('self.selected_box is undefined')})():(typeof self.selected_box == 'function' && self.__is_instance__?pyjslib.getattr(self, 'selected_box'):self.selected_box));
					track.lineno=181;
					sbox.dead();
					track.lineno=182;
					(self.map===undefined?(function(){throw new TypeError('self.map is undefined')})():(typeof self.map == 'function' && self.__is_instance__?pyjslib.getattr(self, 'map'):self.map)).__getitem__((sbox.yth===undefined?(function(){throw new TypeError('sbox.yth is undefined')})():(typeof sbox.yth == 'function' && sbox.__is_instance__?pyjslib.getattr(sbox, 'yth'):sbox.yth))).__setitem__((sbox.xth===undefined?(function(){throw new TypeError('sbox.xth is undefined')})():(typeof sbox.xth == 'function' && sbox.__is_instance__?pyjslib.getattr(sbox, 'xth'):sbox.xth)), 0);
					track.lineno=183;
					self.selected_box = null;
				}
				trackstack.pop();track=trackstack.pop();trackstack.push(track);
				return null;
			}
			, function ( __kwargs, sender, code, modifiers ) {
				if (typeof sender == 'undefined') {
					sender=__kwargs.sender;
					delete __kwargs.sender;
				} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.sender != 'undefined') {
					pyjs__exception_func_multiple_values('onKeyPress', 'sender');
				}
				if (typeof code == 'undefined') {
					code=__kwargs.code;
					delete __kwargs.code;
				} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.code != 'undefined') {
					pyjs__exception_func_multiple_values('onKeyPress', 'code');
				}
				if (typeof modifiers == 'undefined') {
					modifiers=__kwargs.modifiers;
					delete __kwargs.modifiers;
				} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.modifiers != 'undefined') {
					pyjs__exception_func_multiple_values('onKeyPress', 'modifiers');
				}
				if (pyjs_options.arg_kwarg_unexpected_keyword) {
					for (var i in __kwargs) {
						pyjs__exception_func_unexpected_keyword('onKeyPress', i);
					}
				}
				var __r = [sender, code, modifiers];
				for (var pyjs__va_arg = 4;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
					__r.push(arguments[pyjs__va_arg]);
				}

				return __r;
			});
			cls_definition.onKeyDown = pyjs__bind_method(cls_instance, 'onKeyDown', function(sender, code, modifiers) {
				if (this.__is_instance__ === true) {
					var self = this;
					if (pyjs_options.arg_count && arguments.length != 3) pyjs__exception_func_param(arguments.callee.__name__, 4, 4, arguments.length+1);
				} else {
					var self = arguments[0];
					sender = arguments[1];
					code = arguments[2];
					modifiers = arguments[3];
					if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					if (pyjs_options.arg_count && arguments.length != 4) pyjs__exception_func_param(arguments.callee.__name__, 4, 4, arguments.length);
				}
				if (pyjs_options.arg_instance_type) {
					if (self.prototype.__md5__ !== '61f2aaebaf48f70e617afa060a9118d1') {
						if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
							pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
						}
					}
				}
				track={module:LlkApp, lineno:184};trackstack.push(track);
				track.module='LlkApp';
				track.lineno=184;
				track.lineno=185;
				trackstack.pop();track=trackstack.pop();trackstack.push(track);
				return null;
			}
			, function ( __kwargs, sender, code, modifiers ) {
				if (typeof sender == 'undefined') {
					sender=__kwargs.sender;
					delete __kwargs.sender;
				} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.sender != 'undefined') {
					pyjs__exception_func_multiple_values('onKeyDown', 'sender');
				}
				if (typeof code == 'undefined') {
					code=__kwargs.code;
					delete __kwargs.code;
				} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.code != 'undefined') {
					pyjs__exception_func_multiple_values('onKeyDown', 'code');
				}
				if (typeof modifiers == 'undefined') {
					modifiers=__kwargs.modifiers;
					delete __kwargs.modifiers;
				} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.modifiers != 'undefined') {
					pyjs__exception_func_multiple_values('onKeyDown', 'modifiers');
				}
				if (pyjs_options.arg_kwarg_unexpected_keyword) {
					for (var i in __kwargs) {
						pyjs__exception_func_unexpected_keyword('onKeyDown', i);
					}
				}
				var __r = [sender, code, modifiers];
				for (var pyjs__va_arg = 4;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
					__r.push(arguments[pyjs__va_arg]);
				}

				return __r;
			});
			cls_definition.onKeyUp = pyjs__bind_method(cls_instance, 'onKeyUp', function(sender, code, modifiers) {
				if (this.__is_instance__ === true) {
					var self = this;
					if (pyjs_options.arg_count && arguments.length != 3) pyjs__exception_func_param(arguments.callee.__name__, 4, 4, arguments.length+1);
				} else {
					var self = arguments[0];
					sender = arguments[1];
					code = arguments[2];
					modifiers = arguments[3];
					if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					if (pyjs_options.arg_count && arguments.length != 4) pyjs__exception_func_param(arguments.callee.__name__, 4, 4, arguments.length);
				}
				if (pyjs_options.arg_instance_type) {
					if (self.prototype.__md5__ !== '61f2aaebaf48f70e617afa060a9118d1') {
						if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
							pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
						}
					}
				}
				track={module:LlkApp, lineno:186};trackstack.push(track);
				track.module='LlkApp';
				track.lineno=186;
				track.lineno=187;
				trackstack.pop();track=trackstack.pop();trackstack.push(track);
				return null;
			}
			, function ( __kwargs, sender, code, modifiers ) {
				if (typeof sender == 'undefined') {
					sender=__kwargs.sender;
					delete __kwargs.sender;
				} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.sender != 'undefined') {
					pyjs__exception_func_multiple_values('onKeyUp', 'sender');
				}
				if (typeof code == 'undefined') {
					code=__kwargs.code;
					delete __kwargs.code;
				} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.code != 'undefined') {
					pyjs__exception_func_multiple_values('onKeyUp', 'code');
				}
				if (typeof modifiers == 'undefined') {
					modifiers=__kwargs.modifiers;
					delete __kwargs.modifiers;
				} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.modifiers != 'undefined') {
					pyjs__exception_func_multiple_values('onKeyUp', 'modifiers');
				}
				if (pyjs_options.arg_kwarg_unexpected_keyword) {
					for (var i in __kwargs) {
						pyjs__exception_func_unexpected_keyword('onKeyUp', i);
					}
				}
				var __r = [sender, code, modifiers];
				for (var pyjs__va_arg = 4;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
					__r.push(arguments[pyjs__va_arg]);
				}

				return __r;
			});
			cls_definition.onLoad = pyjs__bind_method(cls_instance, 'onLoad', function(img) {
				if (this.__is_instance__ === true) {
					var self = this;
					if (pyjs_options.arg_count && (arguments.length < 0 || arguments.length > 1)) pyjs__exception_func_param(arguments.callee.__name__, 1, 2, arguments.length+1);
				} else {
					var self = arguments[0];
					img = arguments[1];
					if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					if (pyjs_options.arg_count && (arguments.length < 1 || arguments.length > 2)) pyjs__exception_func_param(arguments.callee.__name__, 1, 2, arguments.length);
				}
				if (pyjs_options.arg_instance_type) {
					if (self.prototype.__md5__ !== '61f2aaebaf48f70e617afa060a9118d1') {
						if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
							pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
						}
					}
				}
				if (typeof img == 'undefined') img=null;
				track={module:LlkApp, lineno:188};trackstack.push(track);
				track.module='LlkApp';
				track.lineno=188;
				track.lineno=189;
				if (pyjslib.bool(pyjslib.eq((self.img===undefined?(function(){throw new TypeError('self.img is undefined')})():(typeof self.img == 'function' && self.__is_instance__?pyjslib.getattr(self, 'img'):self.img)), img))) {
					track.lineno=190;
					self.onTick(1, true);
					track.lineno=191;
					pyjs_kwargs_method_call(LlkApp, 'Timer', null, null, [{object:canvas}]).scheduleRepeating(100);
				}
				trackstack.pop();track=trackstack.pop();trackstack.push(track);
				return null;
			}
			, function ( __kwargs, img ) {
				if (typeof img == 'undefined') {
					img=__kwargs.img;
					delete __kwargs.img;
				} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.img != 'undefined') {
					pyjs__exception_func_multiple_values('onLoad', 'img');
				}
				if (pyjs_options.arg_kwarg_unexpected_keyword) {
					for (var i in __kwargs) {
						pyjs__exception_func_unexpected_keyword('onLoad', i);
					}
				}
				var __r = [img];
				for (var pyjs__va_arg = 2;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
					__r.push(arguments[pyjs__va_arg]);
				}

				return __r;
			});
			cls_definition.onError = pyjs__bind_method(cls_instance, 'onError', function(img) {
				if (this.__is_instance__ === true) {
					var self = this;
					if (pyjs_options.arg_count && (arguments.length < 0 || arguments.length > 1)) pyjs__exception_func_param(arguments.callee.__name__, 1, 2, arguments.length+1);
				} else {
					var self = arguments[0];
					img = arguments[1];
					if (pyjs_options.arg_is_instance && self.__is_instance__ !== true) pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
					if (pyjs_options.arg_count && (arguments.length < 1 || arguments.length > 2)) pyjs__exception_func_param(arguments.callee.__name__, 1, 2, arguments.length);
				}
				if (pyjs_options.arg_instance_type) {
					if (self.prototype.__md5__ !== '61f2aaebaf48f70e617afa060a9118d1') {
						if (!pyjslib._isinstance(self, arguments.callee.__class__)) {
							pyjs__exception_func_instance_expected(arguments.callee.__name__, arguments.callee.__class__.__name__, self);
						}
					}
				}
				if (typeof img == 'undefined') img=null;
				track={module:LlkApp, lineno:192};trackstack.push(track);
				track.module='LlkApp';
				track.lineno=192;
				track.lineno=194;
				trackstack.pop();track=trackstack.pop();trackstack.push(track);
				return null;
			}
			, function ( __kwargs, img ) {
				if (typeof img == 'undefined') {
					img=__kwargs.img;
					delete __kwargs.img;
				} else if (pyjs_options.arg_kwarg_multiple_values && typeof __kwargs.img != 'undefined') {
					pyjs__exception_func_multiple_values('onError', 'img');
				}
				if (pyjs_options.arg_kwarg_unexpected_keyword) {
					for (var i in __kwargs) {
						pyjs__exception_func_unexpected_keyword('onError', i);
					}
				}
				var __r = [img];
				for (var pyjs__va_arg = 2;pyjs__va_arg < arguments.length;pyjs__va_arg++) {
					__r.push(arguments[pyjs__va_arg]);
				}

				return __r;
			});
			return pyjs__class_function(cls_instance, cls_definition, 
			                            new Array(LlkApp.Canvas));
		})();
		track.lineno=196;
		if (pyjslib.bool(pyjslib.eq(LlkApp.__name__, String('__main__')))) {
			track.lineno=197;
			canvas = LlkApp.LlkCanvas(pyjslib.int(LlkApp.Window.getClientWidth()), pyjslib.int(LlkApp.Window.getClientHeight()));
			track.lineno=198;
			LlkApp.RootPanel().add(canvas);
			track.lineno=199;
			img = (canvas.img===undefined?(function(){throw new TypeError('canvas.img is undefined')})():(typeof canvas.img == 'function' && canvas.__is_instance__?pyjslib.getattr(canvas, 'img'):canvas.img));
			track.lineno=200;
			imgobjs = new pyjslib.List([]);
			track.lineno=201;
			var pyjs__trackstack_size_1=trackstack.length;
			var __i = pyjslib.range(10).__iter__();
			try {
				while (true) {
					var i = __i.next();
					
					track.lineno=202;
					xth = i % LlkApp.cwidth;
					track.lineno=203;
					yth = pyjslib.int( ( i / LlkApp.cheight ) );
					track.lineno=204;
					pyjslib.printFunc([xth, yth], 1);
					track.lineno=205;
					imgobj = LlkApp.ImgObj(img, xth, yth);
					track.lineno=206;
					imgobjs.append(imgobj);
				}
			} catch (e) {
				if (e.__name__ != 'StopIteration') {
					throw e;
				}
			}
			if (trackstack.length > pyjs__trackstack_size_1) {
				trackstack = trackstack.slice(0,pyjs__trackstack_size_1);
				track = trackstack.slice(-1)[0];
			}
			track.module='LlkApp';
			track.lineno=209;
			pyjslib.map = new pyjslib.List([new pyjslib.List([0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 1, 0, 1, 1, 0, 1, 1, 0]), new pyjslib.List([0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 0, 0]), new pyjslib.List([0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 1, 0, 1, 1, 0, 1, 0, 0]), new pyjslib.List([0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 1, 0, 1, 1, 0, 1, 0, 0]), new pyjslib.List([0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 1, 0, 1, 1, 0, 1, 0, 0]), new pyjslib.List([0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 1, 0, 1, 1, 0, 1, 0, 0]), new pyjslib.List([0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 1, 0, 1, 1, 0, 1, 0, 0]), new pyjslib.List([0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 1, 0, 1, 1, 0, 1, 0, 0]), new pyjslib.List([0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 1, 0, 1, 1, 0, 1, 0, 0]), new pyjslib.List([0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 1, 0, 1, 1, 0, 1, 0, 0]), new pyjslib.List([0, 0, 1, 1, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1, 1, 0, 1, 0, 0]), new pyjslib.List([0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 1, 0, 1, 1, 0, 1, 0, 0]), new pyjslib.List([0, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 0, 1, 0, 0]), new pyjslib.List([0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 0, 1, 0, 0])]);
			track.lineno=225;
			positions = new pyjslib.List([]);
			track.lineno=226;
			var pyjs__trackstack_size_1=trackstack.length;
			var __temp_y = pyjslib.enumerate(pyjslib.map).__iter__();
			try {
				while (true) {
					var temp_y = __temp_y.next();
								var y = temp_y.__getitem__(0);
                			var line = temp_y.__getitem__(1);
                
					track.lineno=227;
					var pyjs__trackstack_size_2=trackstack.length;
					var __temp_x = pyjslib.enumerate(line).__iter__();
					try {
						while (true) {
							var temp_x = __temp_x.next();
												var x = temp_x.__getitem__(0);
                					var position = temp_x.__getitem__(1);
                
							track.lineno=228;
							if (pyjslib.bool((position != 0))) {
								track.lineno=229;
								positions.append(new pyjslib.Tuple([x, y]));
							}
						}
					} catch (e) {
						if (e.__name__ != 'StopIteration') {
							throw e;
						}
					}
					if (trackstack.length > pyjs__trackstack_size_2) {
						trackstack = trackstack.slice(0,pyjs__trackstack_size_2);
						track = trackstack.slice(-1)[0];
					}
					track.module='LlkApp';
				}
			} catch (e) {
				if (e.__name__ != 'StopIteration') {
					throw e;
				}
			}
			if (trackstack.length > pyjs__trackstack_size_1) {
				trackstack = trackstack.slice(0,pyjs__trackstack_size_1);
				track = trackstack.slice(-1)[0];
			}
			track.module='LlkApp';
			track.lineno=230;
			canvas.init_map(pyjslib.len(pyjslib.map.__getitem__(0)), pyjslib.len(pyjslib.map));
			track.lineno=231;
			candidate_imgs = new pyjslib.List([]);
			track.lineno=232;
			img_count = pyjslib.len(imgobjs);
			track.lineno=233;
			var pyjs__trackstack_size_1=trackstack.length;
			var __i = pyjslib.range( ( pyjslib.len(positions) / 2 ) ).__iter__();
			try {
				while (true) {
					var i = __i.next();
					
					track.lineno=234;
					candidate_imgs.append(imgobjs.__getitem__(i % 10));
				}
			} catch (e) {
				if (e.__name__ != 'StopIteration') {
					throw e;
				}
			}
			if (trackstack.length > pyjs__trackstack_size_1) {
				trackstack = trackstack.slice(0,pyjs__trackstack_size_1);
				track = trackstack.slice(-1)[0];
			}
			track.module='LlkApp';
			track.lineno=235;
			var pyjs__trackstack_size_1=trackstack.length;
			var __i = pyjslib.range(pyjslib.len(candidate_imgs)).__iter__();
			try {
				while (true) {
					var i = __i.next();
					
					track.lineno=236;
					candidate_imgs.append(candidate_imgs.__getitem__(i));
				}
			} catch (e) {
				if (e.__name__ != 'StopIteration') {
					throw e;
				}
			}
			if (trackstack.length > pyjs__trackstack_size_1) {
				trackstack = trackstack.slice(0,pyjs__trackstack_size_1);
				track = trackstack.slice(-1)[0];
			}
			track.module='LlkApp';
			track.lineno=237;
			random_imgs = LlkApp.sample(candidate_imgs, pyjslib.len(candidate_imgs));
			track.lineno=238;
			var pyjs__trackstack_size_1=trackstack.length;
			var __temp_idx = pyjslib.enumerate(positions).__iter__();
			try {
				while (true) {
					var temp_idx = __temp_idx.next();
								var idx = temp_idx.__getitem__(0);
                			var pos = temp_idx.__getitem__(1);
                
					track.lineno=239;
					var __tupleassign__000012 = pos;
					x = __tupleassign__000012.__getitem__(0);
					y = __tupleassign__000012.__getitem__(1);
					track.lineno=240;
					imgobj = random_imgs.__getitem__(idx);
					track.lineno=241;
					canvas.setBox(x, y, imgobj);
				}
			} catch (e) {
				if (e.__name__ != 'StopIteration') {
					throw e;
				}
			}
			if (trackstack.length > pyjs__trackstack_size_1) {
				trackstack = trackstack.slice(0,pyjs__trackstack_size_1);
				track = trackstack.slice(-1)[0];
			}
			track.module='LlkApp';
		}

	} catch (pyjs_attr_err) {throw pyjslib._errorMapping(pyjs_attr_err)};
return this;
}; /* end LlkApp */ 




LlkApp_loaded_fn = function() {
}

LlkApp_prepare_mod = function() {
    if ((typeof (module_load_request['LlkApp']) == 'undefined') ||
        (module_load_request['LlkApp'] < 2)) {
        module_load_request['LlkApp'] = 2;
    }
    var modnames = new pyjslib.List([
		new pyjslib.List([
			'pyjamas',
			'config',
			'random',
			'math',
			'lianliankan']),
		new pyjslib.List([
			'pyjamas.DOM',
			'pyjamas.ui',
			'pyjamas.Timer']),
		new pyjslib.List([
			]),
		new pyjslib.List([
			'pyjamas.Canvas2D',
			'pyjamas.ui.Image',
			'pyjamas.ui.RootPanel',
			'pyjamas.Window'])
	]);
    sys.overrides.update(new pyjslib.Dict({
		'mozilla.pyjslib': 'mozilla.pyjslib',
		'mozilla.pyjamas.DOM': 'mozilla.pyjamas.DOM'
	}));
    path = sys.loadpath;
    /*
    pyjslib.preload_app_modules(path, modnames, LlkApp_loaded_fn,
                                            0,
                                            null);
                                            //'LlkApp');
                                            */
    //alert("module ajax loaded fn called LlkApp");

    if (sys.appname != 'LlkApp')
    {
        if (module_load_request['LlkApp'] < 3) {
            module_load_request['LlkApp'] = 3;
        }
    }
}

//alert("module ajax loaded LlkApp");

LlkApp_prepare_mod();




var wait_count = 0;

var onExecutionError = function (exception, name) {
    var extra = sys.trackstackstr();
    if (extra == '') {
        if (exception.name.indexOf('HaltException', 0) < 0) { 
            extra = "\n.  Rebuild with pyjsbuild -d for more information.";
        }
    } else {
        extra = "\n" + extra;
    }
    alert( "In application " + name + " - " + 
          exception.name + ': '  + exception.message + extra);
};

function LlkApp_imported() {
    LlkApp.__name__ = '__main__';
    try {
        modules['LlkApp'] = LlkApp('__main__');
    } catch (exception) {
        sys.save_exception_stack();
        onExecutionError(exception, 'LlkApp');
    }
}

function prepare_app() {
    var app_modnames = new pyjslib.List([
		new pyjslib.List([
			'pyjamas',
			'lianliankan',
			'math',
			'random',
			'config']),
		new pyjslib.List([
			'pyjamas.ui',
			'pyjamas.Timer',
			'pyjamas.Location',
			'pyjamas.DOM']),
		new pyjslib.List([
			'pyjamas.Window',
			'pyjamas.ui.Event',
			'pyjamas.log',
			'pyjamas.ui.MouseListener',
			'pyjamas.ui.FocusListener',
			'pyjamas.ui.Focus',
			'pyjamas.ui.KeyboardListener']),
		new pyjslib.List([
			'pyjamas.ui.UIObject']),
		new pyjslib.List([
			'pyjamas.ui.Widget']),
		new pyjslib.List([
			'pyjamas.ui.Panel',
			'pyjamas.ui.Image']),
		new pyjslib.List([
			'pyjamas.ui.ComplexPanel',
			'pyjamas.Canvas2D']),
		new pyjslib.List([
			'pyjamas.ui.AbsolutePanel']),
		new pyjslib.List([
			'pyjamas.ui.RootPanel']),
		new pyjslib.List([
			'LlkApp'])
	]);
    pyjslib.preload_app_modules(sys.loadpath,
                                app_modnames, LlkApp_imported,
                                0,
                                'LlkApp');
}

function pygwtOnLoad(onLoadError, name) {
    if (onLoadError != null)
        try {
            prepare_app();
        } catch (exception) {
            onLoadError(exception, name);
        }
    else {
        prepare_app();
    }
}

--></script>
</body>
</html>
